How to show field values as text in form

Pedigreeman

Registered User.
Local time
Today, 00:44
Joined
Mar 14, 2011
Messages
57
I have an options group for colour with options: White, Black, Grey, Brown, Other. They are recorded as numbers 1-5 and on the underlying table.

How does one go about recalling this information. Do I need to create a seperate table with two field such as 'number code' and 'colour' and then create a relationship, and use a query? Or is there a better way of looking up these kind of values.

Ultimately I want text boxes in several different forms, which will look up these (and other similar) values and display the correct text.

Any suggestions would be much appreciated as always
 
if you want to use the option gropu, then simply construct one with values 1-5, and associate the descriptions with the five buttons. or use a drop-down, to select from a value list.

the problem comes if you want to have more than these 5 colours. - you dont want to redesign the option group - you may even run out of screen real estate. you probably also dont want to have to redesign the drop downs in order to change the value list (ie to add another colour)

which is why developers use lookup tables - you just add another colour option to the lookup table, associate it with a different key value, and the drop down automatically shows the new value without needing any dbs re-design.

and note that users dont even need to know what the key value is - since they only need to see the mapped text for that value. which is why autonumbers work.
 

Users who are viewing this thread

Back
Top Bottom