display?

hi there

Registered User.
Local time
Today, 03:27
Joined
Sep 5, 2002
Messages
171
hello everyone,

i have a quick question. i'm working with a relational dbase where my primary key for my main table (ReqSource) is based on 2 fields: ReqID and ESourceID. each of those fields are primary keys (child fields?) to 2 other tables which form a relationship with my main table. when i create a new record in my main table i have to fill in the ReqID which is of numeric data type and isn't meaningful to the user. essentially i have to fill in a "5" which corresponds to "annual tune-up" which is the actual information i'm trying to enter. it becomes very tedious to have to go back to the ReqID table to find the ReqID number each time i want to enter a new record in my main table (ReqSource). what i would like to do is have a lookup field for my ReqID field in my ReqSource table which allows the user to directly select "annual tune-up" instead of having to enter the number value "5". so the table would still store the value "5" but would display "annual tune-up". can someone help me with this? many thanks for any suggestions and help.
 
Are you using a form to display this information?

If so, then what you may want is a combobox that is set up to display the description field("annual tune-up"), but its bound to the ID field("5").

1.) Create a combobox
2.) Set its recordsource property = select ReqID field, "YourDescription" field from ReqSource;
3.) Set its ColumnCount property = 2
4.) Set its ColumnWidths property to 0;1

You will then have a combobox that when equal to "5", the user will actually see "annual tune-up". (The first column is "hidden", but the second column is displayed.) Therefore you can set the [ReqID] field in your table = Me.combobox and it wil set the field to "5" and not "annual tune-up".

You can also do the same thing to a table, but then you can't see the actual values (which I don't recommend doing this).

HTMS
 

Users who are viewing this thread

Back
Top Bottom