|
-
Apr 3rd, 2012, 04:46 PM
#1
Thread Starter
Member
[Access] Run-time error '3144': - Syntax error in UPDATE statement
Hello, everyone! I'm running an update query programmatically, and I'm receiving a syntax error for some reason. I can't seem to figure out what's wrong. Here's my code:
Code:
Dim db As Database
Set db = CurrentDb()
db.Execute "UPDATE tblBins SET datRepairDate = null, datClaimDate = null, " & _
"txtRepairTech = " & vbNullString & ", txtTypeandSerial = " & vbNullString & ", " & _
"txtAsset = " & vbNullString & ", " & _
"txtPart1andFRU = " & vbNullString & ", txtPart2andFRU = " & vbNullString & ", " & _
"txtPart3andFRU = " & vbNullString & ", txtPart4andFRU = " & vbNullString & ", " & _
"txtPart5andFRU = " & vbNullString & ", memoProblemandTroubleshooting = " & vbNullString & ", " & _
"intHEAT = null, txtLenovoClaimID = " & vbNullString & ", txtStatus = " & vbNullString & ", " & _
"txtTrackingNumber1 = " & vbNullString & ", txtShortClaimNumber1 = " & vbNullString & ", " & _
"txtTrackingNumber2 = " & vbNullString & ", txtShortClaimNumber2 = " & vbNullString & ", " & _
"txtTrackingNumber3 = " & vbNullString & ", txtShortClaimNumber3 = " & vbNullString & ", " & _
"txtTrackingNumber4 = " & vbNullString & ", txtShortClaimNumber4 = " & vbNullString & ", " & _
"txtTrackingNumber5 = " & vbNullString & ", txtShortClaimNumber5 = " & vbNullString & ", " & _
"boolComplete = False " & _
"WHERE ((([tblBins].binID)='" & Me.binID & "'));"
Everything is a String except for intHEAT, datRepairDate, datClaimDate, and boolComplete. Those variables are of the data types Integer, Date, Date, and Boolean, respectively.
I've tried a lot of solutions and suggestions online, but I'm not sure what the syntax error is. Does anyone have any suggestions? Thanks in advance for any help!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|