Results 1 to 4 of 4
  1. #1
    Bobwords is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Location
    Minneapolis, MN
    Posts
    28

    Create an update query

    Hello,



    I'm trying to create an update query, but I'm not 100% sure how to go about doing what I need. I have a database that I am using to track inventory shipments. There are a total of 3 device types (the tables 7962, 7942 and 6921) which are tracked in the "RMA_Tracker" table. The field Mac_Address on the RMA_tracker table is how I'm determining if the device is in our out of inventory. If that field is filled, then I want it to copy the date from the RMA_tracker table to the Date field on the device tables. I'm using the "date" field on the individual device tables to determine inventory levels (no date = item in stock).

    Click image for larger version. 

Name:	Capture.PNG 
Views:	17 
Size:	74.1 KB 
ID:	17749

    I hope the image helps, as I'm finding it harder to describe this than I thought I would.

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    If the structure of each of the three device tables is the same, i.e. the fields are the same, then you should have only one device table, not three. Device_type would be in that table, not the RMA_Tracker table. Presumably the Mac_Address is unique for each device, regardless of type?

    If you can use only one devices table (instead of three) , in an update query you could join RMA_Tracker and Devices on Mac_Address, and update Date_Shipped in the devices table with the date in RMA_Tracker, where that RMA_Tracker date is not Null.


    PS - Don't use "Date" as a field name - doing so can sometimes lead to problems. "Date" should be considered as "reserved word"

    Post back if you can't use only one Devices table, or if you need further details .

    HTH

    John

  3. #3
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    You will need 3 update queries. One for each device table.

    JOIN the RMA_Tracker and each device table using field Mac_address and device_type.

  4. #4
    Bobwords is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Location
    Minneapolis, MN
    Posts
    28
    Quote Originally Posted by John_G View Post
    If the structure of each of the three device tables is the same, i.e. the fields are the same, then you should have only one device table, not three. Device_type would be in that table, not the RMA_Tracker table. Presumably the Mac_Address is unique for each device, regardless of type?

    If you can use only one devices table (instead of three) , in an update query you could join RMA_Tracker and Devices on Mac_Address, and update Date_Shipped in the devices table with the date in RMA_Tracker, where that RMA_Tracker date is not Null.


    PS - Don't use "Date" as a field name - doing so can sometimes lead to problems. "Date" should be considered as "reserved word"

    Post back if you can't use only one Devices table, or if you need further details .

    HTH

    John

    Ok, I've merged the tables together (a much better method, I do have to say) but I'm not exactly sure what you mean for the update query.

    Click image for larger version. 

Name:	Capture.PNG 
Views:	10 
Size:	29.6 KB 
ID:	17770

    I've linked these two fields in a query, but what exactly would I need to place after that? I've never built an update query before.

    Thanks for the help by the way!

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

Similar Threads

  1. Replies: 5
    Last Post: 04-04-2014, 03:33 PM
  2. Replies: 2
    Last Post: 08-05-2013, 06:36 PM
  3. Replies: 2
    Last Post: 12-20-2011, 07:33 AM
  4. Replies: 1
    Last Post: 12-16-2011, 08:16 AM
  5. Field allow create but not update
    By techexpressinc in forum Forms
    Replies: 8
    Last Post: 10-14-2010, 07:45 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