Runtime 3075

O

Opal

Help! I can't see where my error is....

I am running Access 2003 and have the
following:

Dim strQuery As String
Dim HoldAreaID As Integer

HoldAreaID = Forms!frmProcessUpt!AreaID

strQuery = "UPDATE Processtbl " & _
"SET AreaID = " & HoldAreaID & _
"WHERE AreaID Is Null"

CurrentDb.Execute strQuery, dbFailOnError

I keep getting a runtime error 3075 missing operator

Can someone help point me to where I went wrong?
 
J

John Spencer

Missing a space before WHERE

strQuery = "UPDATE Processtbl " & _
"SET AreaID = " & HoldAreaID & _
" WHERE AreaID Is Null"

A little technique I often use is to always insert a space at the beginning
(right after the quote mark). It makes for an easy scan and the SQL
interpreter doesn't care if you have extra spaces.

strQuery = " UPDATE Processtbl " & _
" SET AreaID = " & HoldAreaID & _
" WHERE AreaID Is Null"

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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

Top