Results 1 to 3 of 3
  1. #1
    SpotoR1 is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2009
    Location
    Japan
    Posts
    6

    Cool Query for IIF statements

    I forgot how to do this: I have a table and the field name is 3 position numeric 111, 121, 131 and I am trying to get a text displayed:
    BOS $35
    SRM $36
    OTHER $5,000

    So the iff statement is not a simple iif this then and else.

    BOS are all the 111
    SRM are all the 121
    OTHER are all the 131 codes.

    Anyone know how to do this?

    I have tried creating a new column called location: IIF([SAG]="111","BOS", or IIF([SAG]="121","SRM", or IIF([SAG]="131","OTHER")

    this did not work open to suggestions.



    Thanks in advance - Ray

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    Iif([SAG]="111","BOS", iif([SAG]="121","SRM", iif([SAG]="131","OTHER") )

  3. #3
    SpotoR1 is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2009
    Location
    Japan
    Posts
    6

    Talking thank you

    I will try that tomorrow thanks for the prompt reply that is what I am looking for.

    I will be able to see what you have and apply it and see where I messed up I could have swore I had something similar but it didnt work for me so this will give me something to work with.

    again thanks,

    ray

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

Similar Threads

  1. IIF Statements
    By JDA2005 in forum Queries
    Replies: 8
    Last Post: 07-07-2009, 04:24 PM
  2. If statements
    By Ezeecopy in forum Access
    Replies: 0
    Last Post: 03-24-2009, 04:54 AM

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