Results 1 to 6 of 6
  1. #1
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117

    Count items in report

    I have the following Count in a report
    =" = " & Count(*) & " " & IIf(Count(*)=1,"item","items") & ""
    When the report runs, it includes items where the quantity is equal to 1.
    I don't want to see these.


    Does anyone know how I can restrict the report to only include all items where the count >1

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Do it in the query on which the report is based.

    Cheers,
    Vlad

  3. #3
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    I do not know how to do this.......
    Can you explain how I transfer the Count details shown on the report into the query

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Can you show us what you want?

  5. #5
    FJM is offline Competent Performer
    Windows 98/ME Access 2003
    Join Date
    Jun 2010
    Posts
    117
    Click image for larger version. 

Name:	Capture.jpg 
Views:	6 
Size:	68.8 KB 
ID:	34687

    This is the report I have.
    At the moment, most of the "Total number of entries" count are 1.
    I want to get rid of these. Then, with the records that are left, I want to sort by highest count to lowest count.
    Click image for larger version. 

Name:	Capture.PNG 
Views:	6 
Size:	18.1 KB 
ID:	34689
    This is the query which runs the report
    Attached Thumbnails Attached Thumbnails Capture.PNG  

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Create a new query called qryPartsOverOne or something with the following SQL :

    SELECT NCRFORM.NCRNO, Count(NCRFORM.CREPARTNO) AS CountOfCREPARTNO
    FROM NCRFORM
    GROUP BY NCRFORM.NCRNO
    HAVING (((Count(NCRFORM.CREPARTNO))>1))
    ORDER BY Count(NCRFORM.CREPARTNO) DESC;




    Now link it via the NCRNO field to your original query and it will eliminate the parts that have a count of 1 and sort them descending as requested.

    Cheers,
    Vlad

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

Similar Threads

  1. Replies: 3
    Last Post: 01-13-2016, 12:34 PM
  2. Queries - Count items in a column
    By turboace in forum Queries
    Replies: 1
    Last Post: 05-21-2014, 05:12 AM
  3. Count data items by name
    By msuguy71 in forum Programming
    Replies: 9
    Last Post: 01-29-2014, 02:19 AM
  4. Replies: 8
    Last Post: 05-24-2011, 03:41 PM
  5. Count Items by Time Period
    By pawslover in forum Queries
    Replies: 1
    Last Post: 11-15-2010, 03:57 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