Runtime 3075

  • Thread starter Thread starter Opal
  • Start date Start date
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?
 
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
 
Back
Top