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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying both fields in a combo box.

Status
Not open for further replies.

batteam

Programmer
Sep 12, 2003
374
US
I have a combo box that is correctly displaying a list of employees and a number assoc. with each. However, when I select one of the names and move off the control (with the cursor), on the name of the employee is displayed in the combo box. I have the bound column and the employee's ID number but I am not displaying that in the control.

Any ideas on how I can get both the name and the number showing in the contol permanently?

Thanks for any help you can provide.
 
I have a combo box that is correctly displaying a list of employees and a number assoc. with each. However, when I select one of the names and move off the control (with the cursor), on the name of the employee is displayed in the combo box. I have the bound column and the employee's ID number but I am not displaying that in the control.

Any ideas on how I can get both the name and the number showing in the contol permanently?

Thanks for any help you can provide
 
A list box, or you could add text boxes and populate them with the results of the combo box.
 
sorry about that. I pasted the wrong thing:

That is normal combobox behavior. You may use a listbox or I like to concatenate my row source.
Select EmpLastName & ", " & EmpFirstName & " (" & empEmployeeID & ")" as NameID, ... other fields...

Then you can display something like: Smith, John (123-45678)

You would then likely bind it to a hidden employee ID field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top