Results 1 to 5 of 5
  1. #1
    lonesoac0 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Aug 2014
    Posts
    36

    Replacing numbers with text at the query level

    Hello all,



    I have a table that has numeric values for cities. I query for the information but it comes out as numbers that represent the cities and not their actual names. I would like to set it up in the query to replace the numbers with the actual names. I am pretty sure that this can be done in the Field row of the query designer, just not sure how to go about it.
    Attached Thumbnails Attached Thumbnails query_level.PNG  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    Use a translate table..say tCityNumConv.
    [city]
    [CityNum]

    list all cities and their num values in the table.
    Then Link this to your data table and it will translate it for you. Enter city names in the tCityNumConv.City critiera.
    No code needed.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,973
    Agree, create table then build query that joins tables.
    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.

  4. #4
    lonesoac0 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Aug 2014
    Posts
    36
    Cool beans. I will try it out. Thank you guys!

  5. #5
    lonesoac0 is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Aug 2014
    Posts
    36
    That was perfect guys. I already had a table like you suggested already setup. I just replaced the field that contained the numbers to the field that contained the names and it worked.

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

Similar Threads

  1. Replies: 2
    Last Post: 07-09-2014, 06:41 PM
  2. Replies: 3
    Last Post: 06-12-2014, 10:30 AM
  3. Replacing a text with an image
    By kroll73 in forum Reports
    Replies: 1
    Last Post: 04-15-2014, 11:15 PM
  4. Replacing text for a report
    By Zaram in forum Reports
    Replies: 7
    Last Post: 02-23-2010, 12:27 PM
  5. Replacing text in my database
    By sbrobin in forum Access
    Replies: 0
    Last Post: 02-08-2009, 02:17 PM

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