Combo Box in a Form

RitaGale

New member
Local time
Today, 18:37
Joined
Jun 29, 2000
Messages
7
I have a combo box in a form to select an employee's name that should populate a table to hold the informationl. However, when I examine the table, instead of a name the primary key is there. How can I stop this from happening?
 
It sounds like you have your rowsource from a query? If so you are selecting both the employee name and the employee ID. If this is the case, under properties set your bound columns to 1. If that doesn't help, you need to tell us what your record source is and what your control source is. (Both are under properties)
 
I had the form built with a QUERY. I deleted the form and rebuilt it with the table. The bound control was already "1".
The record source is Name. Unfortunately, the control source had the primary key and the name field. However, if I delete the primary key in "SELECT DISTINCT" then nothing shows in the combo box on the form.
Do you have any more suggestions? Thanks!
 
Go into the properties for your combo box and set the column widths to hide the primary key and only show the name field.
Example: If your first field is the primary key and your second field is the name field, then your column widths would be as follows:
0; 1; and so on. This way the first column is hidden and the second column is shown with a 1" width. Also, go back and reset your form to use your query if you are combining information from more than 1 table to display in your forms.

Good luck
 
Carol, Thanks for your assistance. However, the Name Combo Box is only the "Name field".
Every time I create this combo box the "SELECT DISTINCT" pops into the control source automatically. I tried the table/Lookup by specifying a Combo box instead of a text box, and that didn't work either. Does anyone else have a suggestion?
 
Make your combo box and unbound combo box not related to your forms underlying record source. Set the record source for this combo box to your query and that should do it.

Good luck.
 

Users who are viewing this thread

Back
Top Bottom