How to display the real meaning of alook up field instead of simpl

A

Ally

A table has a text look up field called "TypeOfRequest" which takes "1" for
"New", "2" for "Replace", "3" for "Construction" from a table nameed
tblTableOfRequest as a look up table. I get the value such as "1", "2", or
"3" for the TypeOfRequest field from users. However, I don't want to display
1, 2, or 3 for TypeOf Request later in my query or on the report that would
based on the query. I want the corresonding meaning of the number showed up
on the report. For example, if the TypeOf Request is 1, I want "New"
displayed in the query or on the report. If the TypeOf Rquest is 2, I want
"Replace" displayed in the query or on the report.

Would anyone please let me know how I should make the real meaning displayed
while storing the numeric number (text field) in the field?

Thanks a lot!
 
R

Rick Brandt

Ally said:
A table has a text look up field called "TypeOfRequest" which takes
"1" for "New", "2" for "Replace", "3" for "Construction" from a table
nameed tblTableOfRequest as a look up table. I get the value such as
"1", "2", or "3" for the TypeOfRequest field from users. However, I
don't want to display 1, 2, or 3 for TypeOf Request later in my query
or on the report that would based on the query. I want the
corresonding meaning of the number showed up on the report. For
example, if the TypeOf Request is 1, I want "New" displayed in the
query or on the report. If the TypeOf Rquest is 2, I want "Replace"
displayed in the query or on the report.

Would anyone please let me know how I should make the real meaning
displayed while storing the numeric number (text field) in the field?

Thanks a lot!

http://www.mvps.org/access/lookupfields.htm
 
A

Albert D.Kallal

Do you have a another table with the values?


id Description
1 New
2 Replace
3 Construction

Hopefully, you got a table with the above values (that way, you can easily
add new values over time - I can't imagine a design where you got to go and
actually add values in "design" mode).

Once you got the above table, then you simply drop in this table in the
query used for the report. draw a join line, and then droop in the
description field.

Now, when you design the report, you will see the "description" in the field
list.
 
J

John Vinson

Would anyone please let me know how I should make the real meaning displayed
while storing the numeric number (text field) in the field?

If you don't already have one, create a small lookup table providing
the translation (if you currently have a List of Values combo box,
switch it to Table/Query and point it to this table).

In your Forms, use a combo box bound to the numeric field, but
displaying the text; base your Reports on a query joining your table
to the lookup table, and pull the text field from the lookup table.

John W. Vinson[MVP]
 
A

Ally

Yes, I do have a table with the values. Thanks for letting me know the trick
to get the description displayed on the report by drawing a join line. Thanks!
 
A

Ally

John,

Thanks very much for your reply. Now I got exactly what I want show in the
form and on the report!

really appreicate your help!

Ally
 
Top