Results 1 to 5 of 5
  1. #1
    zernon916 is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    3

    update / append query to edit single record

    Hi, I am working on a query to update only 1 field to start, but multiple later on a single record. The only record to be changed is the current record opened in the form. I am struggling with this and would love some help.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    your update query will look at the key on the form, then just run the query, docmd.runquery "quUpdate'

    update table set [field] = 'new value' where [id]= forms!myForm!txtID

  3. #3
    zernon916 is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    3
    ok, so I put the where [ID]= forms!temp!txtID into my criteria, it is still updating 0 records... and the where [ID]= forms!temp!txtID is getting split into 2 seperate lines next to the original set. right now it looks like this....
    field1 next box "where [ID]"
    temp next box
    field2 next box
    empty crieteria next box [forms]![temp]![txtID]

    what am I doing wrong?

  4. #4
    zernon916 is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    3
    figured it out thanks guys, I was edditing in access when I shoulda looked at the sql stuff

  5. #5
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    You DO edit in the access query.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-04-2015, 10:17 AM
  2. Update and append with single query
    By FinChase in forum Queries
    Replies: 1
    Last Post: 07-01-2014, 11:04 AM
  3. Append Query For Single Record
    By burrina in forum Forms
    Replies: 8
    Last Post: 01-04-2013, 05:12 PM
  4. Append Query For Single Record
    By burrina in forum Queries
    Replies: 3
    Last Post: 12-30-2012, 11:23 PM
  5. Single Record Update Query from a Form
    By Steven.Allman in forum Access
    Replies: 0
    Last Post: 03-30-2011, 09:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums