Results 1 to 3 of 3
  1. #1
    NebrGuy is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    2

    yes/no in a report

    I am trying to create a database report for work and I'm not sure if this question is more of a report question or a query question. The purpose is to track certain types of activities that will be reported to funders. One activity will be trainings provided to other people and the funder asks for the number of people trained in specific categories of professions and then the topics trained on. The number of people is pretty basic for me (I'm a self-taught advanced novice). What I'm struggling with is creating a report on the topics trained. The table would have the following fields (hypothetically):
    ID
    ActivityDate (necessary as reports are for specific periods of time)
    Math: y/n
    History: y/n
    English: y/n
    Band: y/n

    (yes, I understand normalization rules would probably move the activity date out of this table and into a separate table that is linked to each of the other tables, but just throwing it in here to show the need for or purpose of the date)

    What I would like to do is be able to run a report that will list the categories of topics with a checked box if that topic was covered and an unchecked box if it is not covered in a training. I know the easier report would be based on a query that just finds those topics checked as yes, but I would like to format the report to mirror the question on funders actual report. In other words I would like the access report to list every option available, but only put a check mark next to it if there was a yes response. Keep in mind that there could be multiple trainings through the report period so a table might look like this:
    ID Date Math History English Band
    1 1/5/13 y n y n
    2 2/14/13 n n y y

    I would like the report to then look like this:

    Period: 01/01/13 to 06/30/13


    Math: <x>
    History: < >
    English: <x>
    Band: <x>

    Is there a simple way to format a report around a yes/no response like this?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Your hypothetical data structure is not normalized. You show only 4 subjects. If you later need to add more then would have to modify table, queries, forms, reports to accommodate new field(s).

    However, if you want to stay with that design, try an aggregate query.
    SELECT Sum(IIf([Math]=True,1,0)), ... FROM tablename WHERE [Date] BETWEEN #1/1/2013# AND #6/30/2013#;

    The result will be 1 record. The fields can be arranged vertically in report.
    Last edited by June7; 08-03-2013 at 05:02 PM.
    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
    NebrGuy is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    2
    Thanks. Yep, I realized that it wasn't normalized, but was using the hypo as more of a reference to understand what I am trying to track. I'm not familiar with the aggregate query so I'll look into it. Thanks! Greatly appreciate the input.

    Robert

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

Similar Threads

  1. Replies: 3
    Last Post: 03-11-2013, 05:11 PM
  2. Replies: 4
    Last Post: 12-13-2010, 05:33 PM
  3. Replies: 2
    Last Post: 08-25-2010, 01:42 PM
  4. Replies: 3
    Last Post: 05-21-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