By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

Updating a particular record in a table from a form

P: 46
Trying to update a record based on a unbound field on a form named punch id. I am getting a syntax error.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.RunSQL "Update [Copy of Employee Work Statistics1] SET "[Trip Sign off] = '" & Me!Trip_S_off & "'"  WHERE [Punch ID] = forms![Royal Time Stamp]![Punch ID]"
Mar 17 '14 #1

✓ answered by Seth Schrock

Is there a message and or number that goes with the error?

You also have an extra double quote right before the WHERE.

Share this Question
Share on Google+
4 Replies


Seth Schrock
Expert 2.5K+
P: 2,951
Remove the double quote after the SET keyword.
Mar 17 '14 #2

P: 46
Thanks for your reply seth. I am still getting a syntax error


Expand|Select|Wrap|Line Numbers
  1. DoCmd.RunSQL "Update [Copy of Employee Work Statistics1] SET [Trip Sign off] = '" & Me!Trip_S_off & "'"  WHERE [Punch ID] = forms![Royal Time Stamp]![Punch ID]"
Mar 17 '14 #3

Seth Schrock
Expert 2.5K+
P: 2,951
Is there a message and or number that goes with the error?

You also have an extra double quote right before the WHERE.
Mar 17 '14 #4

P: 46
Removing the extra quotes made it work perfect. Thank you for the help Seth
Mar 17 '14 #5

Post your reply

Sign in to post your reply or Sign up for a free account.