G
G Lam
Hi, In a form, I made an unbound control (rptdate) for user to enter a date
and the a button to print report with the date as filter.
For the click button event, I wrote the code like this:
DoCmd.OpenReport "RptshowOrd", acNormal, "qryShowOrd", "OrdDate = #
me.rptdate#"
Error: Syntax error in date in query expression '(OrdDate = #me.rptdate#)'
I tried
"orddate = & #me.rptdate#&"
""" & # me.rptdate # & """"
"OrdDate = #me.rptdate#"
"OrdDate = "" &#rptdate#&"""
but none worked.
How can I get this done?
Thank you.
Gary
and the a button to print report with the date as filter.
For the click button event, I wrote the code like this:
DoCmd.OpenReport "RptshowOrd", acNormal, "qryShowOrd", "OrdDate = #
me.rptdate#"
Error: Syntax error in date in query expression '(OrdDate = #me.rptdate#)'
I tried
"orddate = & #me.rptdate#&"
""" & # me.rptdate # & """"
"OrdDate = #me.rptdate#"
"OrdDate = "" &#rptdate#&"""
but none worked.
How can I get this done?
Thank you.
Gary