Lookup and fields

J

Jon

Hi,

How do I use the lookupfunction and show two (or more) fields instead of only the first one. I would like to lookup Customer number and would like the "shown" value to be 2 fields, the Surname and the first name. Is this possible?

Jon
 
J

John Vinson

Hi,

How do I use the lookupfunction and show two (or more) fields instead of only the first one. I would like to lookup Customer number and would like the "shown" value to be 2 fields, the Surname and the first name. Is this possible?

Jon

See http://www.mvps.org/access/lookupfields.htm for several reasons
why you should not use the "table lookup" feature AT ALL, EVER.

On a Form, you can easily do this by having a combo box containing all
the fields you want to see; elsewhere on the form you could have
textboxes with rowsources

=comboboxname.Column(n)

where n is the zero based subscript of the field.

Or, you could create a Query concatenating the first and last name:
e.g.

SELECT CustomerID, [Surname] & ", " & [Firstname] FROM Customers;

Using this as the rowsource of the combo will show both names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top