Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2009
    Posts
    8

    Unanswered: query help (criteria options)

    Good day

    need some help with setting criteria, i need to set the criteria to check a field for a certain value (yes) in a table and only if its "yes" then display that field in the query results, but if its "no" that field is not displayed in the results.

    there are five tables in the query
    Student info, teacher info, subjects offered, course schedule, hearing impaired teachers. now the query to be performed is to search for a student by either their student id , name and the day and current time, and it will display the class, subject and teacher that student has for the particular timeframe. I would like the query to display the hearing impaired teacher as well as the subject teacher if the student is hearing impaired, therefore the reason for my question above

    any help would be appreciated i'm using access07
    Last edited by netlab; 02-05-09 at 15:52.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you could do that in the SQL or you could do it in form or report
    if its a form, in the forms on current event
    if isnull(mycolumnname) then mycontrolname.visible = false else mycontrolname.visibile = true

    that can be shortened to
    mycontrolname.visible = NOT isnull(mycontrolname)

    if its a report then in the reports on print format event you do something similar
    mycontrolname.visible = NOT isnull(mycontrolname)
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2005
    Posts
    1,191
    Is this for a report or what? If so, then you'll need to set the visible property of the field on the OnFormat event of the report.
    Me.Geek = True

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    Like Healdem said
    Me.Geek = True

  5. #5
    Join Date
    Jan 2009
    Posts
    8
    yes the query is a form, will try what you said thanks

  6. #6
    Join Date
    Feb 2009
    Posts
    2
    Quote Originally Posted by healdem
    you could do that in the SQL or you could do it in form or report
    How would you do that in the SQL? I can't seem to figure it out..

  7. #7
    Join Date
    Feb 2009
    Posts
    2
    Quote Originally Posted by healdem
    you could do that in the SQL or you could do it in form or report
    How would you do that in the SQL? I can't seem to figure it out..

    Thanks for your help.

Posting Permissions

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