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

    Query Count and Max don't appear to be providing the intended results-Prob Me

    Lo again all,



    I have a query that I am trying to identify the largest "version no" of either a quote/order and also the "counts" of version numbers (To validate the max). I have attached three screen shots showing the query and results.

    The max version for the boxed item should be "3" and the count should also be "3", but that's not what the query is producing.

    Ideas?

    Click image for larger version. 

Name:	Counts.jpg 
Views:	9 
Size:	183.4 KB 
ID:	28086

    Click image for larger version. 

Name:	Counts2.png 
Views:	8 
Size:	58.2 KB 
ID:	28087

    Click image for larger version. 

Name:	Counts3.png 
Views:	8 
Size:	9.1 KB 
ID:	28088

    Ty kindly

  2. #2
    Miskondukt is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    21
    I do have 16 rows of 'invoices' from the linked GL table, but they are not "quotes" but invoices referencing the quote/order number.

    Click image for larger version. 

Name:	Counts4.png 
Views:	7 
Size:	29.2 KB 
ID:	28089

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I do have 16 rows of 'invoices' from the linked GL table, but they are not "quotes" but invoices referencing the quote/order number.
    And those are the rows that it is counting. The query without the Group By would have one row for each of those invoices, which means the Version No. occurs 16 times. They are all the same because they are coming from the same record in the Quotes n Orders table, but there are still 16 of them.


    A solution would be to create another query based on the GL Billing table, which will have the sum of the (Post Amount??) values for each order. Then, in the query above, link to that secondary query instead of the original GL Billing table. There will be only one record in that secondary query for each order.

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

Similar Threads

  1. Replies: 8
    Last Post: 06-12-2014, 09:55 AM
  2. Query not providing correct number of entries
    By mpreston14 in forum Queries
    Replies: 3
    Last Post: 04-27-2013, 08:23 AM
  3. Replies: 8
    Last Post: 02-03-2013, 01:19 AM
  4. Replies: 1
    Last Post: 12-15-2012, 12:43 PM
  5. Prob with Query
    By winterh in forum Access
    Replies: 6
    Last Post: 04-25-2012, 09:40 AM

Tags for this Thread

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