Results 1 to 3 of 3
  1. #1
    Khatru is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    5

    Using some, but not all list boxes in a form to access query.

    I have a form which generates a report from three different lists. The lists are: Segment, Term and Academic Year. I use the following statements in the Query to access the information.

    (IIf(IsNull([Forms]![DetailInstructorForm]![SegmentList]),"*",[Forms]![DetailInstructorForm]![SegmentList]))

    (IIf(IsNull([Forms]![DetailInstructorForm]![TermList]),"*",[Forms]![DetailInstructorForm]![TermList]))
    (IIf(IsNull([Forms]![DetailInstructorForm]![YearlyList]),"*",[forms]![DetailInstructorForm]![YearlyList]))
    The form works great when all the information is used but I would also like to use it when I want to use just one list (Like AcademicYear). When I try this by putting a blank field in the list it does not generate any data.
    Any thoughts? I am using Access 2010.


    Thank You.

  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,600
    Try:

    LIKE [Forms]![DetailInstructorForm]![SegmentList] & "*" Or Is Null
    LIKE [Forms]![DetailInstructorForm]![TermList] & "*" Or Is Null

    LIKE [forms]![DetailInstructorForm]![YearlyList] & "*" Or Is Null

    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
    Khatru is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    5
    Thanks. Exactly what I needed. Owe you a beer.

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

Similar Threads

  1. Query from Multiple List Boxes
    By Gee in forum Access
    Replies: 1
    Last Post: 02-14-2013, 10:42 PM
  2. Replies: 3
    Last Post: 02-12-2013, 11:26 AM
  3. Summing two list boxes on a form
    By TinaCa in forum Forms
    Replies: 1
    Last Post: 06-09-2012, 01:28 PM
  4. Replies: 3
    Last Post: 11-26-2010, 12:38 PM
  5. Search form with list boxes
    By scottay in forum Programming
    Replies: 15
    Last Post: 07-27-2010, 09:28 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