Results 1 to 2 of 2
  1. #1
    pldm123 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2016
    Posts
    1

    Full name in table to abbreviation in query

    Hi all,



    I have a table populated by a form where the user enters the country and state/province (complete names) as an account information. The user can enter up to 2 accounts for each case.

    Later in the process, I am using a query to get information from that table. However, I would like the query to output the country and state abbreviation instead of a full name. Only one of the two accounts is displayed using a iff statement.

    "Country: Iff([Type]="Type1";[AdrCountry_1];Iff([Type]="Type2";[AdrCountry_2];""))"

    I created a "full name - abbreviation" table.

    What do I need to add to the query (as of now my output is the full name) to get the abbreviation?

    Thank you very much,

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    instead of nesting Iif statements, try the easier SWITCH function

    country: Switch( [Type]="Type1", [AdrCountry_1], [Type]="Type2", [AdrCountry_2])

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

Similar Threads

  1. Access won't print full width of table
    By JGLTX in forum Access
    Replies: 2
    Last Post: 01-31-2016, 10:48 PM
  2. See full field name in a table
    By crobaseball in forum Access
    Replies: 4
    Last Post: 05-05-2015, 01:03 PM
  3. Replies: 11
    Last Post: 06-11-2014, 04:50 PM
  4. Replies: 3
    Last Post: 01-21-2014, 12:28 AM
  5. Full Database and Table Capacity Reached
    By LizeAccess in forum SQL Server
    Replies: 1
    Last Post: 10-11-2011, 07:43 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