HELP: Run-Time Error 3075

T

Tim

I have a form that has syncronized Combo Boxes.
cmbCategory
cmbClassName

cmbClassName is the object in focus, and I run into a problem (run-time
error 3075) when I scroll through the records and I come upon a class name
that contains an apostophe. (i.e. Operator's Training)

The sync code I am using is as follows in the form's ON CURRENT event:

cmbCategory = dLookUp ("[category]", "table1", "[ClassName]=' " &
cmbClassName.Value & " ' ")

The error message I get is as follows:
Syntax error (missing operator) in query expression '[ClassName]='operator's
training".
 
A

Allen Browne

The problem is the embedded apostrophy inside the double quotes.

Try using double quotes instead of single quotes:
cmbCategory = dLookUp ("[category]", "table1",
"[ClassName]=""" & cmbClassName.Value & """")
 

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

Similar Threads


Top