syntax docmd.openreport with more criterea

  • Thread starter Thread starter Peter
  • Start date Start date
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
 
Yup, it's syntax. <g>

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