Results 1 to 3 of 3
  1. #1
    TKTheKid is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    35

    Utilizing a summary query in another query to compare data

    Hi all,

    In the attached database, I have query queryDifference that compares the quantities of all UPCs in tables tableKWIData and tableWarehouseData and only displays records for those that are not equal. However, if you look at the last five rows in queryDifference, you'll see that the data repeats and shows the difference per each record.

    What I really want to have is one line that shows 50 for KWI QUANTITY and 30 for WHSE QUANTITY and 20 for Difference. So I created a new query querySumUPC to summarize the quantities in tableWarehouseData by UPC. I can definitely use this for my comparison, but I'm really confused on how to do it.



    In queryDifferenceCOPY I tried to utilize querySumUPC to get what I want, but I'm getting errors. I think I'm way off. Can anyone help out?

    Much appreciated!

    Tony
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    There are 5 records in tableWarehouseData for article 9326302909. These 5 records must each join to the one record in the Articles union and so then the one 9326302909 record in tableKWIQuantity will also join to each of the 5 records and repeat data. So your idea to use GROUP BY query is appropriate, however, this looses other details of the records. Remove tableWarehouseData from the query and use the querySumUPC in its place. Need to set join link between the Article fields.
    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.

  3. #3
    TKTheKid is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    35
    Thanks June. That helped!

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

Similar Threads

  1. Summary query
    By dsk96m in forum Queries
    Replies: 3
    Last Post: 02-29-2012, 01:40 PM
  2. Summary table query Access 2007
    By DesCall in forum Access
    Replies: 4
    Last Post: 05-05-2011, 02:38 AM
  3. No Summary option in Query Wizard
    By LilMissAttack in forum Queries
    Replies: 1
    Last Post: 11-15-2010, 04:32 PM
  4. Summary Query - How to?
    By ritch in forum Access
    Replies: 16
    Last Post: 02-17-2010, 03:18 PM
  5. Product in a Summary Query
    By Fletch in forum Queries
    Replies: 0
    Last Post: 12-11-2008, 03:14 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