display LastName "comma" Firstname in a combobox

ion97

Registered User.
Local time
Today, 03:00
Joined
Feb 28, 2001
Messages
27
A combo box on a form is bound to a table with three fields: id(autonumber), LastName and FirstName.

Is it possible to display the name in the combo box like this:
Smith, John ?
 
Yes.

In the RowSource of your ComboBox:

SELECT YourTable.id, [LastName] & ", " & [FirstName] AS AnyName
FROM YourTable;

Replace 'YourTable' with the name of your table.
'AnyName' can be anything; you can edit it later by clicking on the elipses (...) in the RowSource field of the property sheet for your ComboBox.

ComboBox should have 2 columns, width of the first one should be 0 inches.

Shep
 

Users who are viewing this thread

Back
Top Bottom