Results 1 to 7 of 7
  1. #1
    jseib1947 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    4

    display field question

    I am new to this forum, and I dont know how to word my question to search the forum.

    I have been using a single access database since 1997 to track all my companies customers, and their orders.

    My database has four tables: employees, customers, vendors, and orders

    My customer table has a field called RID, which is a number that indicates the geographical region where they are located.



    I would prefer that the field display in reports as a name. For example, if a customer has 2 in the RID column, that is northern Indiana. Is there a way to let access know that and to display as text not a number>?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    How many regions? If only a few can use IIf or Switch function in expression in query or textbox.

    Switch(RID=1,"Region 1", RID=2,"Region 2", RID=3,"Region 3")

    If you have many more regions, build a table of them then join this table to the other on the RID primary/foreign key fields.
    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.

  3. #3
    jseib1947 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    4
    I have 15 RID fields. I guess building a table is the way to go?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    You have 15 regions? A Switch expression could probably handle (don't know the limit on pairs) but that is a long enough list to justify table. Just a choice of which you like better, building the expression whenever needed or joining tables to retrieve the related info.
    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.

  5. #5
    jseib1947 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    4
    I am doing something wrong when I create the table. Itws been so long since I did that I have forgotten how to create a new table that is shairng/referencing data from abnother table (in this case, my RID filed that is numeric in the customer table with the new "regions" table that I will create that will add text description of each RID number)

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The RID field in Region table must be primary key. This could be an autonumber but since you already have the RID value in Customer table, the ID generated by autonumber will not match, so make it a number datatype. Set it to Index (Yes no duplicates), same for the description field.
    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.

  7. #7
    jseib1947 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    4
    bingo. thats it. Works perfectly. I have to tell you, I step into forums of one sort or another occasionally to try to find answers on my own, and more often than not I become frustrated at either no repsonse, or getting berated for my lack of knowledge or whatever. But you provided me with accurate and extremely helpful repsonses that allowed my work to get done much faster than I could figure out on my own. I truly thank you.

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

Similar Threads

  1. Have an interesting image display question.
    By mike_art03a in forum Forms
    Replies: 6
    Last Post: 11-05-2011, 12:13 AM
  2. Replies: 0
    Last Post: 07-26-2010, 01:45 PM
  3. Report control of a field display/no display
    By systems013 in forum Reports
    Replies: 5
    Last Post: 02-01-2010, 09:44 AM
  4. Replies: 1
    Last Post: 02-27-2006, 07:46 AM
  5. Access Relationship Display Question
    By dayrinni in forum Access
    Replies: 3
    Last Post: 02-05-2006, 11:16 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