Results 1 to 8 of 8
  1. #1
    Pascale is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    17

    Question Report to list Values on Variable1 based on Yes/No on Variable2

    I have a large Union query with, among others, Tasks and some 20 associated Competencies (let's call them Comp1 to Comp20). Tasks are text boxes while Competencies are Yes/No fields. I would want a report with:
    1. Total number of Yes for each Competency (This, I can do!)
    2. For each Competency, a list of tasks for which the given competency was checked (Yes answer)


    For example, 4 tasks require Competency 1, leading to "4" for #1 above. The remaining 16 Competencies are not counted as they got a No answer. I would like the report to list the 4 tasks for which Competency 1 was checked.



    Could someone help me with this?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    if Competencies is a YES/NO value ,then you need a query that counts the Tasks given the competency.
    on a form, show a list of competencies (your query) and the count
    click on the list item, to run a query to show the count of tasks.

    the query, docmd.openquery "qsTasks1Comp" , will look at the form list box clicked....
    select * from tasks where [compency] = forms!myForm!lstboxComps

  3. #3
    Pascale is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    17
    Thanks. Let me try that.

  4. #4
    Pascale is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    17
    Hum... Tasks is not a list box. My Union query rather looks like the example below.
    Task Comp1 Comp2
    Task1 0 0
    Task2 1 0
    Task3 1 1
    Task4 0 0
    Total 2 1

    In that example, I would want my Report to show:
    Comp1 Comp2
    Total=2 Total=1
    Tasks: Tasks:
    Task2 Task3
    Task3

  5. #5
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Use subreports - one for each type of what you are trying to see. Each subform would have its own record source/query showing exactly what you want to see.

  6. #6
    Pascale is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    17

    How to assign different record source to subreports?

    Quote Originally Posted by aytee111 View Post
    Use subreports - one for each type of what you are trying to see. Each subform would have its own record source/query showing exactly what you want to see.
    Thanks again. I had tried that but was not able to assign different record source to subreports.

  7. #7
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Every subreport has to have its own record source - how were you not able to accomplish that?

  8. #8
    Pascale is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Nov 2016
    Posts
    17
    OK. I figured it out. It works fine. Thanks!

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

Similar Threads

  1. Replies: 1
    Last Post: 11-22-2016, 06:31 AM
  2. Open a Report based on List Box Selections
    By CKING in forum Reports
    Replies: 12
    Last Post: 10-16-2013, 11:03 AM
  3. Open Report based on list box selection
    By BorisGomel in forum Access
    Replies: 2
    Last Post: 04-17-2013, 02:41 PM
  4. Open a report based on a filtered list box
    By irish634 in forum Access
    Replies: 5
    Last Post: 02-07-2012, 08:10 AM
  5. display a list of values based on user input
    By karl1971 in forum Access
    Replies: 3
    Last Post: 12-06-2011, 09:19 AM

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