Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lookup column

Status
Not open for further replies.

me83

Programmer
Aug 19, 2002
8
NL
I have two tables. The first table contains the following columns:
- 'ID' (this is an autonumber and the primary key)
- 'First Name'
- 'Last Name'
- 'Telephone'

In the second table I created a column with the 'Lookup wizard'. In the wizard I selected all columns of my first table (the first column as bound column).

My problem is: If I open the second table (datasheet view) and I click in the lookup column I get a combobox with three columns (first name, last name, telehone), so far so good! But if close the combobox only the first column (first name) is visible!!! How can I change this??? Is it possible to show all the three columns???
 
Yes, this is possible.

Go into the design of the second table in which you have used the lookup wizard.

select the field with the lookup.

go to the properties pane at the bottom (F6 Shortcut key)

three three dots next to row source click on them to build the row source.

This will envoke the query builder.

add an extra field in the query

in the field name put the following

details: [firstname] & "," & [lastname] & "," & [telephone]

If it works fine then you can get rid of the other three fields which select the firstname, lastname and telephone fields individually.

back to the properties of the table further down from the row source.

Bound column stays the same i.e. 1

select number of columns (bound columns)

change it to 2 instead of 4 that you presently have

column widths, experiment with the second columns width the first column should stay as zero so that the key column is hidden.

try something like

0;4

change the list width property to reflect the sum of all columns, or in your case both columns.

so columns are 0;4 column width = 4
If columns are 2;4 column width = 6

above is just an example remember first column should remain as zero in your case.

This should work.

Idd



 
Thanks for your quick reply! Keep up the good work!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top