Results 1 to 3 of 3
  1. #1
    raweber is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    12

    Select as based on other critieria

    I would like to create a query where the value of one of the fields will be based on the presence or absence of values in four other fields. In essence, if field A is null, then STATUS will have one value. If A is not null but B is null, STATUS will have a second value. If A and B are not null but C is, a third value. And, if D is checked, that overrides everything for the foruth value of STATUS.



    Question: is this sort of thing possible in a Select query? If so, can someone point me to a reference?

    Thanks, and I can provide more information if needed.

    Rob

  2. #2
    hertfordkc is offline 18 year novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    481
    I believe that you could accomplish that with a calculated field in your query.
    It would involve using 1) a calculated field and 2) Status:iif(condition, result 1, result2)

  3. #3
    raweber is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    12
    Thanks, hertfordkc, it looks like that will do the trick. Kind of an ugly nested IIF statment, but it works.

    Rob

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

Similar Threads

  1. Select record based on values of other records
    By dchaboya in forum Queries
    Replies: 2
    Last Post: 08-11-2011, 10:41 AM
  2. Replies: 1
    Last Post: 07-11-2011, 05:12 AM
  3. Select based on Max Query
    By eww in forum Queries
    Replies: 2
    Last Post: 05-13-2011, 01:11 PM
  4. Select Random Records Based on Conditions
    By access123 in forum Queries
    Replies: 1
    Last Post: 10-27-2010, 10:25 AM
  5. Select a certain field of a record based on ID
    By cesarone82 in forum Access
    Replies: 3
    Last Post: 06-06-2009, 01:16 PM

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