Results 1 to 5 of 5
  1. #1
    Miskondukt is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    21

    What might I be doing wrong w/ query to not get multiplied results. Pls help & TY

    I have built a design that I thought was good on normalization and referential integrity, but my query values are NOT coming out correctly. The attached screenshot of the query is multiplying the SumofOrderTotal by 15 and the SumofPostAmount by 5. The latter table has three records of that OrderID and the former table only has one record.

    Can anyone point me in the right direction as to why this is happening?

    Click image for larger version. 

Name:	DatabaseDiagram.png 
Views:	9 
Size:	88.8 KB 
ID:	29172

    Click image for larger version. 

Name:	BadQuery2.png 
Views:	9 
Size:	24.5 KB 
ID:	29173



    Click image for larger version. 

Name:	BadQuery.png 
Views:	9 
Size:	13.6 KB 
ID:	29174

  2. #2
    Miskondukt is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    21
    Trying to piece this apart, even when removing the joined table and running the query with the one table the sum is multiplied by 15 and there is only one record on said table. Why would this be happening?

  3. #3
    Miskondukt is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    21
    I was able to get accurate results by creating two subqueries to total the GLBilling/COGS values, then bring those queries into the related table query. Is this an access best practice, or is there another way?

    Click image for larger version. 

Name:	GoodQuery.png 
Views:	5 
Size:	25.9 KB 
ID:	29177

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Duplicate thread?

    Do not group when you don't need to, it slows down processing a lot.

    Yes, very well done.

  5. #5
    Miskondukt is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    21
    Err, kind of a dup thread. This one was for the database design/RI concern but I kinda derailed it adding the query issue. Noted on grouping and thanks for the confirmation again.

    More rep and marking solved.

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

Similar Threads

  1. Query Results being Multiplied
    By E1202413 in forum Access
    Replies: 4
    Last Post: 11-14-2014, 09:08 AM
  2. Sum Query Delivers wrong results
    By rbf in forum Queries
    Replies: 5
    Last Post: 03-30-2013, 03:18 PM
  3. Calculation in Query giving wrong results
    By dargo72 in forum Queries
    Replies: 11
    Last Post: 11-07-2012, 05:39 AM
  4. Query Issues: Multiplied Results
    By Sa'El in forum Access
    Replies: 1
    Last Post: 09-12-2011, 09:46 AM
  5. Expression gives wrong results
    By newtoAccess in forum Queries
    Replies: 22
    Last Post: 12-03-2010, 12:21 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