Dim strDocName As String
Dim strWhere As String
Dim strQueryName As String
strQueryName = "Date Reported Stamp"
strDocName = "Irrigation Nitrate Report"
CurrentDb.Execute strQueryName, dbFailOnError
DoCmd.OpenReport strDocName, acViewPreview, , "ReportNumber Between " & Me.BegReport & " And " & Me.EndReport
DoCmd.Close acForm, "Get Print Batch"
In the above code I am getting a "Too few parameters. Expected 2." error message. The query date stamps a field in a table then opens the appropriate report. The error message doesn't tell me where the error lies.
Thanks