Run time error '3075'

wildcat

Registered User.
Local time
Today, 06:05
Joined
Jan 15, 2009
Messages
20
I am working on a form and am getting the following error.

Syntax error (missing operator) in query expression '55WHERE
tblWorker.WorkerID=20090007'

Here is the code that I have taken and reworked based on information from the forum.

sSql = "UPDATE tblWorker " & _
"SET tblWorker.LocationID = " & Me.cboLocationComboBox & _
"WHERE tblWorker.WorkerID= " & Me.cboWorkerComboBox & ";"
DoCmd.RunSQL sSql

Thanks for your assistance!
 
A common mistake. Note the lack of a space before the word "WHERE".
 
That fixed it - thanks!!!!!!
 
I am working on a form and am getting the following error.

Syntax error (missing operator) in query expression '55WHERE
tblWorker.WorkerID=20090007'

Here is the code that I have taken and reworked based on information from the forum.

sSql = "UPDATE tblWorker " & _
"SET tblWorker.LocationID = " & Me.cboLocationComboBox & _
"WHERE tblWorker.WorkerID= " & Me.cboWorkerComboBox & ";"
DoCmd.RunSQL sSql

Thanks for your assistance!

I would also use
Code:
CurrentDb.Execute sSQL, dbFailOnError
instead of the DoCmd.RunSQL (unless you like the warning messages).
 
that was helpful - didn't want to see the warning messages every time.

I appreciate it alot!
 
One more question:
I have the code working and it is doing everything that I want it to, except I am using that code to help me find "unmatched ID" in a query. That query uses a GenderID field that is to match the GenderID from the form.
Now that I am using this code, it does not show the people in the query that match the GenderID.

Any suggestions?
 

Users who are viewing this thread

Back
Top Bottom