Full Version: Combo box not selecting
UtterAccess Forums > Microsoft® Access > Access Forms
I know there's a simple answer to this but I can't seem to find it. I have a combo box based on a query that pulls names from an employee table. In the query I've concatenated the names so I have Last Name, First Name Middle Ini as "FullName".
The query works fine and loads my combo box allowing me to scroll down through the names. However, when I select a name nothing happens, the name just stays highlighted. I'd like to populate the combo box with the selection. This form is being used as a "Find Employee" selection for another form.
Also, I'd like to have the combo box fill in as the individual starts typing the name. I have the Auto Expand property set to Yes, but nothing happens when I try typing in the combo box.
If you could point me to what I'm doing wrong I'd appreciate it.
Thanks a bunch!!
First, check the cbo properties sheet under the Data tab and select Auto Expand . . . that should be set to Yes for the auto search. You can also hit the F1 key while there to get access to open the help for that property.
With your qry for the cbo, do you have as a col 0 hidden the StaffID number for the folks in the list?
That's the value the cbo can use to either select (bound form) or use that value to pass to another form.
You can use the after_update or on_exit events to place this value in other location or if using a pick screen, use a cmd button to accomplish the same thing.
Hey Steve,
The Auto Expand property is set to Yes. I have the StaffID number in the query as the first column but I don't have it "hidden". I am using the StaffID to bind the form to my employees table. I've tried a Compact and Repair, so far I can't choose an item from the combo box. I tried creating another form with a combo box based on my query. I was thinking that maybe there was some corruption in the original form. The new form didn't work either.
Ocan create an unbound combo box based on my employee table that does allow me to select the last name AND will fill in the name as I type. As long as I can use the staffID from this combo box to load an employee into my main form I'll be ok. What do you think?
The only thing I can think of is that you should hide the actual StaffID col . . . you can still refer to it since the default of a cbo is column 0.
never show the ID of any of my tables since they are all autonumbers . . . and can't be changed by the user.
The solution you came up with is Ok . . .
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.