Update table SQL statement dont work?

hardrock

Registered User.
Local time
Today, 23:08
Joined
Apr 5, 2007
Messages
166
Hi all, i'm using this SQL statement to attempt to update my Emailaddress field in my table "tblrecord", however it doesn't seem to work. Here's the code

Dim dbs As Database
Set dbs = CurrentDb

dbs.Execute "UPDATE tblrecord SET [EmailAddress] = '" & EA & "' WHERE[PurchaseOrder] = '" & PO & "';"

dbs.close

*******************
EA could be a text string i.e "hard@rock.com"
PO is a number i.e 123456

Any help appreciated!
 
You shouldn't have quotes around the number. The rule is quotes round strings not round numbers.
 
Thanks! Exactly that :)
 

Users who are viewing this thread

Back
Top Bottom