Results 1 to 2 of 2
  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows XP Access 2000
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672

    IIF In Query

    I need my query to manipulate some field data for me


    If employeeName = James Jones show JJ
    If employeeName = Richard Barker show RB
    Else show employeeName

    I know you can use the below to format both fields, but what about my else
    Code:
    FormatMe: IF([employeeName]="James Jones", "JJ", IIF([employeeName] = "Richard Barker", "RB"))

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Try:
    FormatMe: IIF([employeeName]="James Jones", "JJ", IIF([employeeName] = "Richard Barker", "RB",[employeeName]))

    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

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