Results 1 to 4 of 4
  1. #1
    thesaifeye is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2018
    Posts
    1

    Question Need to show all sold product codes in a query! Need help!

    Generally in our store one customer buy several products with different product code and quantity. I used a different table for for calculating the total pricing of a purchase and sum it to another table.
    I want to show all purchased product codes in query now! But cannot manage to build the function or expression for it!



    If anybody helps me with it, I will be very grateful.
    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    all codes should be in the tOrderDetails table ,

    select tOrderDetails.Code, Sum(tOrderDetails.Qty) from tOrderDetails

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Welcome to the forum....


    Not real clear on what you are trying to do.
    I want to show all purchased product codes in query now!
    By customer?
    Over a date range?

    Maybe examples of raw data and what you want to see....


    It would be helpful to see a picture of the relationship window. (or a copy of your dB with just a few records)
    Not sure why you are "summing to a different table"?? The total can be calculated at any time.

    I would think you would have tables:
    Customers
    Products
    Orders
    OrderDetails.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Here's a link to a free, generic data model dealing with Customers and Orders from Barry Williams site. It might give you some ideas on table structures and relationships.
    Note; that this is a generic model dealing with typical "things" involved in Customers and Orders, but you may not need all tables for your situation.

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

Similar Threads

  1. Replies: 7
    Last Post: 05-02-2018, 02:09 PM
  2. Need to show units that haven't been sold yet
    By Thomasso in forum Queries
    Replies: 7
    Last Post: 02-19-2017, 02:25 PM
  3. Show how many times an item is sold?
    By xtrareal22 in forum Forms
    Replies: 4
    Last Post: 11-29-2013, 08:33 AM
  4. Show Count from different Zip Codes
    By jo15765 in forum Queries
    Replies: 6
    Last Post: 04-15-2013, 12:36 PM
  5. Replies: 3
    Last Post: 02-26-2013, 05:07 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