Miltiple Criteria, Open Report Missing Operator


I have the below and can't find where my syntex error is?  I have tried several things and still nothing.  Either it comes back as an empty string or syntex error as Missing Operator?

What do you think?

the EntryPoint is a ComboBox and the Date is a Date/Time field

        Dim stDocName As String
        Dim stLinkCriteria As String
        stDocName = "rpt_BackgroundCheck"
        stLinkCriteria = "[Date]=" & Me![Date] & " And  [EntryPoint]=" & Me![EntryPoint]
        DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria

Open in new window

Ernest GroggAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You have to add the # string before and after a date

"[Date]=#" & Me![Date] & "# And  [EntryPoint]=" & Me![EntryPoin
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
and by the way, *bad* idea to have a field named that is a reserved word or expression in VBA.

 You can use Rick Fisher's find and replace:

 to change it all over to something else.  Note free, but cheap and reasonable, and it works very well.  Every Access developer should have this, along with MZ tools (free) and Smart Indenter (free).

Ernest GroggAuthor Commented:
I changed the naming convention and still comes back as missing operator?
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Is EntryPoint a string or number ?

If its a string you need to add '
stLinkCriteria = "[Date]=#" & Me![Date] & "# And  [EntryPoint]='" & Me![EntryPoint] & "'"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ernest GroggAuthor Commented:

OK, Can I ask just one more Question?

If I want to add a 3rd string or 3rd criteria how can I add that?

Sorry, I got the one working and now you helped me with the two, but if there is a 3rd? (incidentally there will be in the future)
Ernest GroggAuthor Commented:

I got it:
stLinkCriteria1 = "[DateChecked]=#" & Me![DateChecked] & "# And  [EntryPoint]='" & Me![EntryPoint] & "' And [Background]='" & Me![Background] & "'"

Open in new window

As i wrote before
If its a string you need to add '
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.