Why an I getting a "Syntax" error with the where condition?

I have tried may combinations of the code below, but still get syntax error?

BAD CODE:
SS_OpenForm("Human_P_T_frm"), ([Event_Description]=" & "'" & [Event_Description] & "'")

Any help is greatly appreciated.
ERROR-MESSAGE-1.jpg
ERROR-MESSAGE-2.jpg
Works-Fine-1.jpg
cssc1Asked:
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.

Jeffrey CoachmanMIS LiasonCommented:
AFAICT, ...you can try it something like this:
Docmd.OpenForm "Human_P_T_frm",,,[Event_Description]=" & "'" & [Event_Description] & "'"
0

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
mbizupCommented:
Is SS_OpenForm a custom function?  (it would help to see the function declaration).

That said, it looks like your criteria is missing an opening quote, so try this perhaps:


SS_OpenForm  "Human_P_T_frm",  "[Event_Description]=" & "'" & [Event_Description] & "'" 

Open in new window

0
FarWestCommented:
I learned a good practice (I think) is to use char(34) instead of " when ever it should placed inside another quote
you will always know what " will be inside your string :)
0
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.

cssc1Author Commented:
mbizup (SMIB),
   Sorry, but see attached error message with your example.
Error-3.jpg
0
Gustav BrockCIOCommented:
It should probably read:

SS_OpenForm("Human_P_T_frm", "[Event_Description] = '" & [Event_Description] & "'")

/gustav
0
cssc1Author Commented:
Gustav Brock,
  Please see error.
Thanks and can you think of any other any other options based on what the error says?
ERROR---3.jpg
0
Gustav BrockCIOCommented:
Without knowing the internals of your custom SS_OpenForm function I'm afraid we can't solve this.

/gustav
0
mbizupCommented:
Exactly.   We're taking shots in the dark here.

Jeff Coachman's use of the built in OpenForm should do the trick, however, with the assumption that your custom function is simply opening the form and not doing anything else.
0
cssc1Author Commented:
Thanks
0
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.