Issue on condition WHERE ...AND

Onlylonely

Registered User.
Local time
Today, 21:58
Joined
Jan 18, 2017
Messages
43
Hi Guess,

Appreciate if you could give some hint to me on this.

sSQL2 = "Update Issuetbl Set [Issuetbl].[Result] = 'Pass' WHERE ([Issuetbl].[Serial_Number] = '" & Forms!Checklist!txtSN & "') And ([Issuetbl].[Character_ID] = '1')"
CurrentDb.Execute (sSQL2)
 
It would help if you said what the datatype of Serial_Number and Character_ID are

Assuming the first is text & the 2nd is number then:

Code:
sSQL2 = "UPDATE Issuetbl SET [Issuetbl].[Result] = 'Pass' WHERE [Issuetbl].[Serial_Number] = '" & Forms!Checklist!txtSN & "' AND [Issuetbl].[Character_ID] =1"
CurrentDb.Execute sSQL2

If both are numbers:
Code:
sSQL2 = "UPDATE Issuetbl SET [Issuetbl].[Result] = 'Pass' WHERE [Issuetbl].[Serial_Number] = " & Forms!Checklist!txtSN & " AND [Issuetbl].[Character_ID] =1"
CurrentDb.Execute sSQL2
 

Users who are viewing this thread

Back
Top Bottom