Look Fields Display Primary Key On A FOrm (1 Viewer)

qvqv

New member
Local time
Today, 02:54
Joined
Jan 24, 2021
Messages
1
I have a main table where one of the fields gets its date from a look-up table.

The lookup table consists of an ID (PK) and a Fullname field.

When I create a field on a form based on the main table and have a field on the form which refers to the field in the look-up table it gives the primary key.

How do I change it from the field holding the primary to the Fullname field?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 02:54
Joined
Jul 9, 2003
Messages
16,282
I suspect you need a combobox:-

 

Gasman

Enthusiastic Amateur
Local time
Today, 02:54
Joined
Sep 21, 2011
Messages
14,299
Do not use Lookups on the table. Use a combo as Uncle suggests.
You could also use a DLookUp() to get the value.?

Get rid of the table lookup as this always causes confusion with new users.

Also crossposted with same reply https://www.accessforums.net/showthread.php?t=82790 :(
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 21:54
Joined
Feb 19, 2002
Messages
43,275
Combo and listboxes have a Columns property. Set the width to 0 to hide a column or to any non-zero number to show it.
So,
0,3.5, 1, 0, .3
The RowSource in this example has 5 columns selected. 1 and 4 are hidden. 2, 3, 5 are shown when the combo is dropped down but only 2 shows when the dropdown is closed.

Normally, the first column is the bound column and that is the one that will be saved when an item is selected even though the first column with a non-zero width is what is shown. That is how we store the CustomerID but show his name.
 

Users who are viewing this thread

Top Bottom