Results 1 to 4 of 4
  1. #1
    Cowley is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2021
    Posts
    1

    Updating table

    Hi,



    I have a database with all the COGS(Cost of goods sold) for our ITEMS, a few times each year we do a update based on purchase prices. (not always all)

    So in Table A we have the total list of items with cogs, and in table B we have the list of items that has had it's price increased or decreased.

    Common key in the tables are the item number.

    I then thought I could do an update query that would go something like this.(not trying to write the actual code, just how I think)

    Update tableA.COGS
    With tableB.COGS
    Where tableA.ITEMNUMBER = tableB.ITEMNUMBER

    Any help would be appreciated.

    //Cow

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,537
    Perhaps you could use an "Update" query
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,537
    Cowley

    Using your table and field names, perhaps something like:

    UPDATE tableA INNER JOIN tableB ON tableA.ITEMNUMBER = tableB.ITEMNUMBER SET tableA.COGS = [COGS];
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 2
    Last Post: 11-11-2016, 09:07 AM
  2. Replies: 3
    Last Post: 10-08-2015, 01:02 PM
  3. Replies: 12
    Last Post: 11-11-2014, 02:10 PM
  4. Replies: 2
    Last Post: 03-13-2013, 06:30 AM
  5. Replies: 6
    Last Post: 05-10-2012, 08:20 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