dbTalk Databases Forums  

Auto-Populate Question

comp.database.ms-access comp.database.ms-access


Discuss Auto-Populate Question in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jerkyboy
 
Posts: n/a

Default Auto-Populate Question - 01-17-2004 , 08:09 PM






I have the following fields in a database:

1. State Abbrev
2. State Long Form

I would like to know if it is possible to Type "IL" in the State Abbrev
field and
have "Illinois" auto-populate in the State Long Form field.

Any help would be greatly appreciated.

Thanks



Reply With Quote
  #2  
Old   
Bruce Pick
 
Posts: n/a

Default Re: Auto-Populate Question - 01-21-2004 , 11:27 PM






I don't think there is a way to do this if you are working directly in
the table. If you are entering or updating data in a form, you
certainly can have code that does this. (I assume you would want the
correct full name for every state and its 2-letter code)

However, using a second field to record essentially the same data
violates one of the principles of good management of relational
databases: in plain English, you should not have a field to hold data
that is directly determined by the data that is already recorded in
another field. Entering it twice leaves you open to multiple problems,
all of which a relational database is designed to avoid or eliminate in
the first place.

So, you're much better off with one table of states abbreviations and
the matching names. Link it to the "State Abbrev" field in your current
table, and use it via queries to get the full name of the state any time
you really need it. (set up relationships by having the focus on the
Database Window, then click Tools - Relationships.)

jerkyboy wrote:
Quote:
I have the following fields in a database:

1. State Abbrev
2. State Long Form

I would like to know if it is possible to Type "IL" in the State Abbrev
field and
have "Illinois" auto-populate in the State Long Form field.

Any help would be greatly appreciated.

Thanks



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.