Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL command using textbox from form

Status
Not open for further replies.

Delindan

MIS
May 27, 2011
203
US
I'm having trouble getting the syntax correct on a sql statement that uses information from two text boxes on my form. Here is what I'm trying:

DoCmd.RunSQL "UPDATE [FS Specialists], SET [FS Specialists]! = '" & Trim(Me!txtemail) & "' WHERE [FS Specialists]![FS Specialist] = '" & Trim(Me!txtfsspecialist) & "';"

Anything obvious?

Thanks!
 
What about this ?
Code:
DoCmd.RunSQL "UPDATE [FS Specialists] SET Email='" & Trim(Me!txtemail) & "' WHERE [FS Specialist]='" & Trim(Me!txtfsspecialist) & "'"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
It worked great. I'm guessing it was the extra comma...thanks so much!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top