Results 1 to 2 of 2
  1. #1
    Celx is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Posts
    5

    Update query between two tables troubles?

    Hello,



    So I have two tables, one that is for the receptionist, and one for the administration side of the company I work for.

    I created a query that was supposed to pull in information from the receptionist table fields and update the same fields in the administrator table.

    Currently it does update the desired fields; however only with one variable for each row.

    So say I have two rows in the meat variety field of the receptionist table:

    - Cat meat.
    - Dog meat.

    And in the meat variety field of the administrator table I have these two values:

    - Turtle meat.
    - Rat meat.

    Upon running the update query; I get this result in the meat variety field of my administrator table:

    - Cat meat.
    - Cat meat.

    So while the update query does change the value of my meat field in the administrator table, it only will change the previous values to one value instead of reflecting the two different values in each row of my receptionist table. The values are selected from a drop down menu, could this somehow be affecting the query?

    This is what I have in place in my update query:
    Field: MeatVariety
    Table: Administrator Table
    Update to: [Receptionist Table].[MeatVariety]
    Criteria:
    or:

    Any help would be appreciated!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    How will the query know which records get which value? Is there a common ID field in these two tables? Join the tables on the common ID. This will allow the value of record in one table to update the value of corresponding record in other table.

    Show complete SQL statement for analysis.

    Why do you have two tables anyway?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Query troubles.
    By SteveSummers in forum Access
    Replies: 1
    Last Post: 10-26-2011, 07:48 PM
  2. Replies: 10
    Last Post: 07-12-2011, 11:09 PM
  3. Update 2 tables with one Update Query
    By Douglasrac in forum Queries
    Replies: 4
    Last Post: 04-14-2011, 08:33 AM
  4. Update Query that uses fields from other tables?
    By DarrenReeder in forum Queries
    Replies: 1
    Last Post: 12-06-2010, 10:47 AM
  5. Query troubles
    By dmullins in forum Reports
    Replies: 0
    Last Post: 10-20-2009, 02:17 PM

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