Results 1 to 3 of 3
  1. #1
    Tejas.T is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    3

    Show only groups having Record Count more than one

    I have create a simple report in which I am grouping records by last 2 digits of Either Phone or Phone2 field of my database.
    It works fine but I need to display only those records(groups) which has more than one record in it.

    Attached is snapshot of report generated. And below is the query I am using as RecordSource of report.

    Code:
    SELECT S.FirstName, S.LastName, CD.Phone, CD.Phone2, Right(CD.Phone,4) AS GroupingField
    FROM Student AS S, ContactDetails AS CD WHERE S.Roll=CD.Roll;
    
    
    UNION ALL 
    
    
    SELECT S.FirstName, S.LastName, CD.Phone, CD.Phone2, Right(CD.Phone2,4) AS GroupingField
    FROM Student AS S, ContactDetails AS CD WHERE S.Roll=CD.Roll;
    Database file can be downloaded from here: https://drive.google.com/file/d/0B7g...ew?usp=sharing



    Can anybody please suggest me a solution for this?

    Thanks,
    Tejas
    Attached Thumbnails Attached Thumbnails report_screenshot.PNG  

  2. #2
    Tejas.T is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    3

    Show only groups having Record Count more than one

    I have created a simple report where I group records either by Phone or Phone2 field.
    It is working fine but I need to show only those groups having record count more than 1.
    Below is the snap shot of my report.


    Click image for larger version. 

Name:	report_screenshot.PNG 
Views:	5 
Size:	29.3 KB 
ID:	18866


    So here I want to show up only the 2nd group, and not the others because they have only 1 record in it.

    Below is the query I am using as record source:

    Code:
    SELECT S.FirstName, S.LastName, CD.Phone, CD.Phone2, Right(CD.Phone,4) AS GroupingField
    FROM Student AS S, ContactDetails AS CD WHERE S.Roll=CD.Roll;
    UNION ALL 
    SELECT S.FirstName, S.LastName, CD.Phone, CD.Phone2, Right(CD.Phone2,4) AS GroupingField
    FROM Student AS S, ContactDetails AS CD WHERE S.Roll=CD.Roll;
    Database file can be downloaded from here:https://drive.google.com/file/d/0B7g...ew?usp=sharing

  3. #3
    Tejas.T is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    3
    Anybody can help me here please?

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

Similar Threads

  1. Show Record Count
    By mikej2505 in forum Forms
    Replies: 2
    Last Post: 06-23-2014, 10:35 AM
  2. Replies: 1
    Last Post: 04-07-2014, 04:20 PM
  3. Show Blanks in count as 0
    By WickidWe in forum Queries
    Replies: 2
    Last Post: 12-11-2013, 01:37 PM
  4. Show Count from different Zip Codes
    By jo15765 in forum Queries
    Replies: 6
    Last Post: 04-15-2013, 12:36 PM

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