How show table text, not auto id number

  • Thread starter Thread starter tjsmags
  • Start date Start date
T

tjsmags

I'm in my alumni database CONTACTS table. Within this table is STATE where I
have the alumni's state listed. It shows the actual NAME of the state, not
the auto id number associated with the particular state.

I can't remember how I set this up to show the name, not id number. I have
another one that I need to change, somehow, to show the NAME instead of just
a random id number.

Thanks.
 
To show the state name instead of the number:
1. Open the table in design view.

2. Select the field.

3. In the lower pane of table design, on the Lookup tab, set the Display
control to Combo Box.

4. Create the RowSource query so it retrieves the 2 fields (number, then
state name.)

5. Set the Column Widths property to 0, so it shows the name and not the
number.

You may have originally done this with a lookup wizard. Some developers
despise that wizard, and don't think that combos have any place in your
table:
http://www.mvps.org/access/lookupfields.htm

A better solution might be to create your lookup table of states so it has a
Text field as the primary key instead of the autonumber. It makes good
sense: since you don't want to allow 2 states with the same name, nor any
states without a name, the state name is a natural key for this table.

If you do that, you can then use the state name in your other table as the
foreign key. You don't need the combo in the table to see what state it is,
but you can still use a combo on your form for selecting the state.
 
I just realized I didn't ask the correct question...the WORDS do appear when
I'm in the table if I choose a selection, but, if I input data in FORMS, then
when I go back into the table just a number shows.
 
Create the lookup table suggested in the paragraph starting:
A better solution ...

Use that approach, including the relationship with the Referential Integrity
box checked. Now there is no number that can show up, and things will work
reliably.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Showing ID field 6
Trying to create an auto Lookup Query 4
Data Entry Form and Auto Number ID 2
query - max ID number 2
Auto numbering 1
Auto Number ID Field 4
Auto Numbering 5
Change ID field 2

Back
Top