Search code examples
formsreportms-access-2013

Error in Opening Report from Form


I have a Form which will help me to filter out the records I want for my Report. The button will open the Report On Click.

Form

This is the code in the button:

Private Sub Open_OEE_Click()

DoCmd.OpenReport "OEE_Report", acViewReport, , , acWindowNormal

End Sub

I keep getting the error:

RunTime Error 3071

I also have placed the query in my report under the Record Source as:

SELECT * FROM 3_OEE WHERE ((([3_OEE].RecordID)=Forms![3_OEE_Report]!cboRecordID) And (([3_OEE].Date_Recorded)=DateValue(Forms![3_OEE_Report]!Date_Recorded)) And (([3_OEE].MC_No)=Forms![3_OEE_Report]!cboMCNo) And (([3_OEE].Product)=Forms![3_OEE_Report]!cboProduct));

I want to search based on one criteria (text box or combo box) and not all four at once.

Am I missing out something?


Solution

  • I asked for help from another source. Answer to Question