Results 1 to 4 of 4
  1. #1
    survivo01 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    71

    Criteria for each field does not allow me to get correct info


    I need to know whether a Student has a ABE or GED. Under some conditions I need to know only the students who do not have ABE and just the status of their GED. Do I have to do two queries. Obviously the two queries interact and don't allow me to get the correct info for either one.
    Field ABE GED
    Table Students query Students Query
    Sort
    Show
    Criteria [enter yes for ABE no for does not have] [enter yes for GED no for does not have]

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Does this help:

    Calculate a field in query:

    Category: IIf(IsNull(ABE) AND IsNull(GED),"NONE", IIf(IsNull(ABE),"GED", IIf(IsNull(GED),"ABE", "BOTH")))

    Can apply variety of criteria to that field.
    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
    survivo01 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    71
    I am confused! IF ABE or GED are never null but either yes or no how does this formula work or was this an example for me to play with

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Sorry, missed that the fields are Yes/No type. Try:

    Category: IIf([ABE] AND [GED], "BOTH", IIf([ABE], "ABE", IIf([GED], "GED", "NONE")))

    Then apply criteria to that constructed field of "BOTH", "ABE", "GED", or "NONE".
    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.

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

Similar Threads

  1. Combo Box not showing the correct Field
    By Atlascycle in forum Reports
    Replies: 61
    Last Post: 03-12-2012, 10:51 AM
  2. Listing correct data in a field
    By Lois in forum Forms
    Replies: 1
    Last Post: 10-18-2011, 12:09 PM
  3. Replies: 9
    Last Post: 06-26-2011, 09:14 PM
  4. Replies: 6
    Last Post: 01-07-2011, 12:50 PM
  5. trouble creating correct criteria
    By pshawk in forum Queries
    Replies: 1
    Last Post: 02-12-2010, 01:52 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