View Full Version : Need help on view report.


amae
02-22-2010, 03:23 PM
Hi,

I have a very basic dropdown to select the date, and when click... it should show the data on the date I select but there's something wrong with the form, it won't output any data.

Basically, I have query as follow:

DateOrder Name Product
2/10/2010 Smith A
2/10/2010 Doe B
2/02/2010 Smith A

Then on the form, I have a dropdown to select the date. So it should only output the date I select.

The is when I click on the button to view report

stDocName = "tblReport"
DoCmd.OpenReport stDocName, acPreview, , "DateOrder = " & DateOrder

Please look at my file and tell me what's wrong. By the way, I don't want to change the query, it's the way I want it. :)

Thanks,
Jen

pbaldy
02-22-2010, 03:30 PM
Haven't looked at the attachment, but see here for the syntax needed for a date field:

http://www.baldyweb.com/wherecondition.htm

amae
02-24-2010, 04:38 PM
Still can't figure it out. :( help pls

pbaldy
02-24-2010, 04:44 PM
Your date field is text. Did you try the text syntax? It works for me.