syntax docmd.openreport with more criterea

P

Peter

Hello everyone,

My problem is propably just a syntax problem.

Either of these statements do the job:
DoCmd.OpenReport "R00_t01_Opdrachten", acViewPreview, , "ObjectNr = " &
Me.ObjectNr DoCmd.OpenReport "R00_t01_Opdrachten", acViewPreview, ,
"VolgnrInt = " & Me.VolgnrInt

But this one doesn't:
DoCmd.OpenReport "R00_t01_Opdrachten", acViewPreview, , "ObjectNr = " &
Me.ObjectNr And "VolgnrInt = " & Me.VolgnrInt

Can anyone help?
Greetings,
Peter
 
D

Douglas J. Steele

Yup, it's syntax. <g>

DoCmd.OpenReport "R00_t01_Opdrachten", acViewPreview, , _
"ObjectNr = " & Me.ObjectNr & " And VolgnrInt = " & Me.VolgnrInt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top