Results 1 to 7 of 7
  1. #1
    chloe is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    11

    Post Query/Reports that illustrate frequency

    Please help



    I finally finished my table and form with all the coding needed (yay!). However I'm trying to set up reports to print. I have a macro that will work to print them, but setting up the initial report has been problematic.

    Report 1 - Frequency of Title
    I want to have a report that has the title of a person making an inquiry (MD, DO, RN, PA, etc) - these values are in a list box on my form - so that I know that, like, in the month of January 4 MDs called in, 2 RNs, 6 PAs, etc. In addition to this, I have a yes no check box on my form asking if these titled values are faculty staff of my university. The problem I'm having is, the query is showing a title twice - I'm getting that 2 doctors inquired, and 2 doctors that were faculty inquired. I would rather the query show the TOTAL number of MD's that called together, and then the number of faculty that were those MD's as a subset. Make sense? Maybe I need to combine two queries, or it's something I can designate in the report, but I do not have any idea how to do this.


    Example:

    Title Total Requests Faculty Members Students

    MD 3 1 1
    Rn 3 1


    So that would imply that of the 3 doctor request received, 1 was from faculty member, 1 from a student, 1 from an outside source. Make sense?


    So, with that being said, I can get it to etiher do the total or it will list a title twice like this:
    Example:

    Title Total Requests Faculty Members Students

    MD 2 1 1
    MD 1

    Where it shows 3 requests, but separates it out. Any fixes for this?
    Attached Thumbnails Attached Thumbnails accesscapture01.JPG   accesscapture02.JPG  
    Last edited by chloe; 01-28-2015 at 10:03 AM. Reason: Updated

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Why does a field named Total of Title not actually have number value?

    What are the SumOfCampbell fields? Are they calculated? What are the expressions? Why do these show as checkboxes? Why are they GROUP BY criteria?

    BTW, I deleted your duplicate thread.
    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
    chloe is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    11
    I tried to delete these photos because they were outdated. Here is an updated screenshot below. The title is a drop down menu listing professional title. The total is the amount of inquiries by title. The Faculty and Student fields are check boxes on a form and are meant to indicate if the inquiry title is from the school (faculty/staff) or an outside party.
    Click image for larger version. 

Name:	Capture2.JPG 
Views:	4 
Size:	31.9 KB 
ID:	19493
    Click image for larger version. 

Name:	Capture.JPG 
Views:	4 
Size:	38.0 KB 
ID:	19492

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What happens if you remove the check fields from the query? If you want to do count of Yes checks, can't include the fields in GROUP BY, need an expression and Sum function. What are the original field names in the table this query is based on? Try

    CountIsStudent: Abs([Student])

    CountIsFaculty: Abs([Faculty])

    Then select Sum function instead of Group By for the calculated 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.

  5. #5
    chloe is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    11
    The table these are coming from have the same names for the columns (Campbell Student, Campbell faculty, Title).

    I basically need to know like that 10 doctors are calling in a month, 6 are faculty. But it won't break down like that. When I add columns with the expressions you suggested it populates funky. I'm sorry this is probably something really easy, it's just out of my scope of knowledge.

    Click image for larger version. 

Name:	Capture3.JPG 
Views:	4 
Size:	37.4 KB 
ID:	19494Click image for larger version. 

Name:	Capture4.JPG 
Views:	4 
Size:	42.3 KB 
ID:	19495

  6. #6
    chloe is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    11
    By organizing the data sheet I got it to do this:

    :Click image for larger version. 

Name:	capture 5.JPG 
Views:	4 
Size:	60.5 KB 
ID:	19497

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Didn't do all I suggested. The GROUP BY on the check fields must be removed. Delete those two columns from the grid.

    However, if you do the grouping in report design, don't build query with grouping. The report will allow display of detail records as well as summary calcs in group and report sections.
    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.

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

Similar Threads

  1. Replies: 2
    Last Post: 10-30-2014, 09:40 AM
  2. Replies: 5
    Last Post: 10-29-2014, 12:12 PM
  3. Report Based on Field Frequency
    By thegnome in forum Reports
    Replies: 1
    Last Post: 03-12-2013, 12:28 PM
  4. Frequency of Words in Memo Fields
    By Angrybox in forum Queries
    Replies: 1
    Last Post: 05-07-2012, 03:54 PM
  5. Generate reports by frequency
    By MFS in forum Programming
    Replies: 2
    Last Post: 11-18-2010, 08:09 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