Miltiple Criteria, Open Report Missing Operator

Hello,

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 GroggSecurity Management InfoSecAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

GozrehCommented:
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:

www.rickworld.com

 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).

Jim.
Ernest GroggSecurity Management InfoSecAuthor Commented:
I changed the naming convention and still comes back as missing operator?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

GozrehCommented:
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 GroggSecurity Management InfoSecAuthor Commented:
Ahh...

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 GroggSecurity Management InfoSecAuthor Commented:
OK

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

Open in new window

GozrehCommented:
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.