Results 1 to 15 of 15
  1. #1
    Join Date
    Feb 2004
    Posts
    7

    Unanswered: Ticky box report... help!

    I have a table with each attribute being (Yes/No), as a medical reference table, for example:

    Name: Billy Whizz
    DOB: 01/02/1978
    _______________
    [ ] Heart Condition
    [ ] Liver Cancer
    [ ] Leprosy
    [ ] Smelly feet
    [ ] Etc
    [ ] eTc

    Is it possible to create a report which will only display those feilds that are [YES]? I'm stumped. Any help would be greatly appreciated.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Set your criteria to = -1 (or true) for each field you're sorting on.

    eg:

    SELECT chk1, chk2, chk3
    FROM aTable
    WHERE chk1 = -1 OR chk2 = -1 OR chk3 = -1

  3. #3
    Join Date
    Feb 2004
    Posts
    7
    Is that in the query design? Or in the report?

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    query design.

    You could do it in the report itself if you wanted to, but that's a bit more envolved.

  5. #5
    Join Date
    Feb 2004
    Posts
    7
    This dosent work! I know my problem is that I have the attribute as the disease, and the data as yes/no.

    So any reports come out with every disease listed, and then a box next to each ticked/unticked respectively.

    Is it possible to set a query that will show only the attributes? I cant see a way in Report design to set the visibilty to (yes if = -1)

  6. #6
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by yeahyeahyeah
    This dosent work! I know my problem is that I have the attribute as the disease, and the data as yes/no.

    So any reports come out with every disease listed, and then a box next to each ticked/unticked respectively.

    Is it possible to set a query that will show only the attributes? I cant see a way in Report design to set the visibilty to (yes if = -1)
    In the report ControlSource for the field do some thing like this:

    =IIf([Liver Cancer]= False;Nulo;[Liver Cancer])
    that is all.
    Saludos
    Norberto

  7. #7
    Join Date
    Feb 2004
    Posts
    7
    Nulo?

  8. #8
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by yeahyeahyeah
    Nulo?
    Sorry Null in english
    Saludos
    Norberto

  9. #9
    Join Date
    Feb 2004
    Posts
    7

    Thumbs up

    Could you send an example to me? Sorry.

  10. #10
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by yeahyeahyeah
    Could you send an example to me? Sorry.
    My sample are in spanish, do this send me your sample base in access 97 format with the report, query ..... and i make the change if i can....
    Saludos
    Norberto

  11. #11
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by yeahyeahyeah
    Could you send an example to me? Sorry.
    Ok i prepare an sample and send to you, that sample only show the fields that is on true. Ok
    Saludos
    Norberto

  12. #12
    Join Date
    Feb 2004
    Posts
    7

  13. #13
    Join Date
    Feb 2004
    Location
    Western New York
    Posts
    6

    Re: Ticky box report... help!

    If you want the checkbox to be invisible when it is unchecked you can do this in vba. Put your code in the OnPrint event of the report section where the checkbox. If the checkbox name is ck1 you code with be something like:

    If (ck1) Then
    ck1.Vosible = True
    Else
    ck1.Visible = False
    End IF

    Originally posted by yeahyeahyeah
    I have a table with each attribute being (Yes/No), as a medical reference table, for example:

    Name: Billy Whizz
    DOB: 01/02/1978
    _______________
    [ ] Heart Condition
    [ ] Liver Cancer
    [ ] Leprosy
    [ ] Smelly feet
    [ ] Etc
    [ ] eTc

    Is it possible to create a report which will only display those feilds that are [YES]? I'm stumped. Any help would be greatly appreciated.

  14. #14
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Like i say in my post, i attach a Sample Base in Access 97 format.
    This sample have, two table (Sample and SampleTemp), one of them is only a task table ( only for work ), a form whose make the work using and querydef and a report whose Source Control is the task table (SampleTemp).
    Sorry for my english i am slowly for learn.
    I hope this help you.
    Attached Files Attached Files
    Saludos
    Norberto

  15. #15
    Join Date
    Feb 2004
    Posts
    7

    Thumbs up

    Esto es fantástico. Gracias mucho. Usted es un genio!

    Thankyou.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •