Hi, I have a table with a DateTime field [Entry Date] and a form where a user enters a date and hits a "submit" button to open a report that should only display entries whose dates match the user entry. When I run this line of code to open the report:
DoCmd.OpenRepor t "All Employee Daily Report 2", acViewReport, , "[Entry Date] = " & Format(Me.txtDa te, "\#mm\/dd\/yyyy\#")
I get this error:
Run-time error '102':
Incorrect syntax near '#'
Can someone help me out? I was under the impression that dates have to be enclosed in '#' so i'm not sure what's the problem.
DoCmd.OpenRepor t "All Employee Daily Report 2", acViewReport, , "[Entry Date] = " & Format(Me.txtDa te, "\#mm\/dd\/yyyy\#")
I get this error:
Run-time error '102':
Incorrect syntax near '#'
Can someone help me out? I was under the impression that dates have to be enclosed in '#' so i'm not sure what's the problem.
Comment