Results 1 to 2 of 2
  1. #1
    johnmerlino is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    97

    Update not working in access

    Hey all,

    I'm using Access 2010. I have a query created in Query Design. It looks like this:

    Field: defense
    Table: contacts
    Update To: temp_table.defense
    Criteria: temp_table.last_name AND temp_table.first_name AND temp_table.middle_initial

    The idea is to query the temp_table and update the defense field of the contacts table to the value in the defense field of the temp_table where the contacts.last_name = temp_table.last_name and the contacts_first_name = temp_table.first_name and contacts.middle_initial = to temp_table.middle_initial. Although I do have fields in both table that meet these three criteria, when I run the query, the contact's defense field does not get updated to the value of the temp_table defense field. Rather, I get a message that says 0 changed, meaning that nothing was updated. So I'm not sure what I'm doing wrong.

    Thanks for response.

  2. #2
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    It sounds like it is updating rows where Defense = "temp_table.last_name" AND "temp_table.first_name" AND "temp_table.middle_initial"

    Since the Defense field doesn't contain that text for any records, no records are being updated.

    Make copies of both tables and set the copies aside as a safety measure!
    1. Create a new select query and add both of your tables.
    2. Draw a join line between Lastname and Lastname.
    3. Draw a join line between Firstname and Firstname.
    4. Draw a join line between MiddleInitial and MiddleInitial.
    5. Add the field Defense from the Contacts table to the grid.
    6. View the query to see that is looks like it is displaying the correct number of records.
    7. Return to Design View and change the query type to Update.
    8. In the Update To row for the Defense field, enter: temp_table.defense
    9. Run

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

Similar Threads

  1. Access has stopped working
    By phillb in forum Forms
    Replies: 9
    Last Post: 01-10-2012, 12:22 PM
  2. Update Inner Joing Query not working??
    By snowmman99 in forum Access
    Replies: 2
    Last Post: 09-08-2010, 12:15 PM
  3. Replies: 2
    Last Post: 06-14-2010, 09:38 PM
  4. IIf Update Query working OK but a better way?
    By dreamweaver547 in forum Queries
    Replies: 7
    Last Post: 04-19-2010, 09:47 AM
  5. Replies: 0
    Last Post: 01-06-2009, 03:27 PM

Tags for this Thread

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