473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Updating a particular record in a table from a form

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.

4 1004
Seth Schrock
2,965 Expert 2GB
Remove the double quote after the SET keyword.
Mar 17 '14 #2
Vasago
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
2,965 Expert 2GB
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
Vasago
46
Removing the extra quotes made it work perfect. Thank you for the help Seth
Mar 17 '14 #5

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

Similar topics

1
by: Corinne | last post by:
I have a database that contains the details of pupils in a school. What I would like to do may not be possible but I thought I would ask anyway. Each year the pupils move to a different class,...
2
by: Will | last post by:
I am trying to send a report by email using DoCmd.SendObject acSendReport. When I send the report, it sends the report with all the records whereas I only want the report to show one record. I...
0
by: Murali | last post by:
In MsAccess project I Create the Link table with Sqlserver 2000. I am facing the multiuser Problem in my application. The problem describes below: If one user is updating one record and at that...
3
subashini Thiyagarajan
by: subashini Thiyagarajan | last post by:
<% Dim adoCon Dim rsDeleteEntry Dim strSQL Dim lngRecordNo lngRecordNo = CLng(Request.QueryString("ID")) lngRecordNo1 = CLng(Request.QueryString("ID"))
6
by: Hevan | last post by:
Hi, I am using this sql for updating a large table. This sql should update a record like 'abc123'. The first select will return 'abc' and the second select will return '123'. This works fine...
1
by: rickair7777 | last post by:
Hi, I'm an ex-Notes guy, doing an Access 2007 project. I'm a little weak on Access syntax and functionality. It's not a customer database, but it will be easier to describe it in those terms......
8
by: veerapureddy | last post by:
Hai everybody, I am facing problem with updating a record .actullay im getting some data from database(Access) and populating it on a html form.im trying to edit some texts and update, its not...
4
by: prosad | last post by:
hello, Just solved a problem using Javascript onclick, can click on any cell in a dynamic table and it will pass the innerText object value to my form text field. parts of code given below: ...
0
by: aRuaL | last post by:
Hi all, i have a problem with updating the junction table. I am doing this access project after learning for 2 weeks so pardon me if what the question im asking is really simple. Firstly i have 3...
0
by: hemant1234 | last post by:
I am trying to delete one record table table, but not able to delete. It seems that operation is hanged and after waiting a long time, record does not deleted not an even any error raised. I am able...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.