G
Guest
I am opening a report with the following code in a form:
strCriteria = "Between #" & tbFrom & "# and #" & tbTo & "#"
DoCmd.OpenReport "rptDefective", acViewPreview, , strCriteria
tbFrom and tbTo are text boxes on the opening form.
When I open the report, I get the error:
Syntax error (missing operator) in query expression '(Between
#5/10/2006# and #5/30/06#)'.
For the life of me, I can't see the error. The Where works in SQL. What am I
doing wrong?
strCriteria = "Between #" & tbFrom & "# and #" & tbTo & "#"
DoCmd.OpenReport "rptDefective", acViewPreview, , strCriteria
tbFrom and tbTo are text boxes on the opening form.
When I open the report, I get the error:
Syntax error (missing operator) in query expression '(Between
#5/10/2006# and #5/30/06#)'.
For the life of me, I can't see the error. The Where works in SQL. What am I
doing wrong?