Open report with multiple criteria (two) (1 Viewer)

basilyos

Registered User.
Local time
Today, 02:47
Joined
Jan 13, 2014
Messages
252
i'm trying to open a report after executing a sql to save data from a form
and after saving i want to open the report with the saved data so i want to open it with multiple criteria where number = same number in form and date = same date in form

this is my code

Code:
DoCmd.OpenReport "rpt_wasika_answer", acViewPreview + acViewNormal, , "[404_number] = " & Me![txt_404_number] & " AND [404_date] = '" & Me![txt_404_date] & "'"

but am getting datatype mismatch

i guess it's something with the date??
 

TJPoorman

Registered User.
Local time
Today, 03:47
Joined
Jul 23, 2013
Messages
402
If it's a true Date/Time type you need # instead of '
 

basilyos

Registered User.
Local time
Today, 02:47
Joined
Jan 13, 2014
Messages
252
thank you sir, i should not a mistake like this :)
 

Users who are viewing this thread

Top Bottom