Problem with Where condition for DOcmd.OpenReport

AshikHusein

Registered User.
Local time
Today, 14:21
Joined
Feb 7, 2003
Messages
147
I am trying to open a report with a "WHERE" condition. The data soirce for the report is a query. The report does open but it is blank although there should be information on it. I am using the following statement.

DoCmd.OpenReport "rpt_for_rep_orders", acViewPreview, , "order_date = " & Me.search_date

where search_date is a field on the form and order date is a field on the report pulled up from the query.

Could anyone tell me what I am doing wrong here? Thanks.
 
"order_date = #" & CDate(Me.search_date) & "#"
 

Users who are viewing this thread

Back
Top Bottom