access storing value rather than code

pt706

New member
Local time
Today, 06:27
Joined
Feb 5, 2013
Messages
2
I am sure that this is a very simple question but .......

I have a table lookup that works fine ... 1 = mother 2 = father etc

However, I want to save my results to the access table as father mother NOT 1 2

How do I do it?

Thanks in advance for your help
 
By storing the text rather than the ID number you are taking a retrograde step in terms of data normalisation and DB performance.

Remember that what is stored in the table is irrelevant as far as your user is concerned, as he should have no direct access to the tables or the data stored therein. All interaction with that data should have through the "filter" of a form, in this way you can control what the user sees and how he is able to interact with that data.
 
JBB is right. you store the numeric value

use a query to display the looked up value. this is fundamental to access table design
 
When I first started out in access, I thought it was okay to have LookUps in Tables because Access lets you do that - and it must know what it's doing - I thought(wrongly!).

Since being on this forum, you chaps have put me straight on that.
 
That advice hasn't changed. When people advise against lookups, they are saying in TABLES only. Using lookups (combos) in forms is fine and even preferable. Read the article at the following link to understand why.
http://access.mvps.org/access/lookupfields.htm
When you use lookups (combos), the PK (which is usually numeric) is what gets stored. You use either a combo on a form or join to the lookup table in your query to obtain the "text" value.
 

Users who are viewing this thread

Back
Top Bottom