Results 1 to 2 of 2
  1. #1
    FreshAirGirl is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Oct 2018
    Posts
    2

    Question Combine two tables to allow editing in new table to change original table

    We have food product data in Table 1 (each product has a unique id#) and Table 2 has our customer names with the products that they carry (same unique id# as Table 1).

    We need to update the ingredients in Table 1, but want to prioritize the project by selecting the items carrried by our largest customers first.

    So, I want to combine the two tables, sort by specific customers (Table 2), then update the ingredients in the new table and have the ingredients in Table 1 change.

    I made a query and combined the two tables, but changes only showed up in the new table- they did not affect Table One.

    Can anyone help?



    TIA!

  2. #2
    Cottonshirt is offline Competent Performer
    Windows 8 Access 2007
    Join Date
    Feb 2018
    Posts
    116
    So, I want to combine the two tables...
    you don't really need to combine the two tables.

    what you want is to find the customer that buys the most ingredients, then sort them in descending order with the biggest customer at the top.

    to do this you will need a query that joins the two tables, but it doesn't merge them. merge is separate thing. all you need is a simple SELECT query with a left join that counts how many ingredients each customer buys...

    Code:
    SELECT tbl_customer.customer, Count(tbl_ingredient.customer) AS ingredients
    FROM tbl_customer LEFT JOIN tbl_ingredient ON tbl_customer.customer = tbl_ingredient.customer
    GROUP BY tbl_customer.customer
    ORDER BY Count(tbl_ingredient.customer) DESC;
    something like that.



    many thanks,


    Cottonshirt

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

Similar Threads

  1. Replies: 2
    Last Post: 04-15-2015, 10:05 AM
  2. Replies: 3
    Last Post: 11-22-2013, 04:22 PM
  3. Replies: 5
    Last Post: 05-02-2012, 07:56 AM
  4. Replies: 4
    Last Post: 10-28-2011, 12:49 PM
  5. Replies: 7
    Last Post: 08-18-2011, 02:18 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