State table lookup - How can I display full state name only on data entry?

M

mthornblad

Hi

I have a form for entering Customer data. When entering a new record,
I have a lookup combo box to validate the state that the user enters.
The combo box displays the state code and the state name. (ie. Ca and
California). The state code is the bound value and the state name is
the display value.

The only time I want to display the full state name is when the user
is entering data into the form. I want the state code to be displayed
on queries, forms, and reports.

Is there a way to do this ?

Thanks in advance
Mark
 
A

Allen Browne

Create a table with 2 fields like this:
StateID Text (say, 3 or 4 characters)
State Text (enough characters for all state names)
Mark the StateID field as primary key.

In the properties (lower pane in table design) for State, set
Required Yes
Indexed Yes, No Duplicates.

Save the table with a name such as tblState. Enter the abbreviated state
names in the first column, and the full state names in the 2nd.

Now on your form, use a combo box for the state. Give it properties like
this:
Row Source tblState
Column Count 2
Column Widths 0
 

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

dependent combo boxes 1
Text transfer and selection 1
Show Data from another Form 2
Combo box problem 7
Cascading Combo Disaster 4
data entry on form 1
Combo Box Lookup ??? 1
Combo box help! 3

Top