PDA

View Full Version : Solved: Getting autofill to work in a combo box when user types into it



nathan2314
12-12-2008, 09:41 AM
:hi:
Hello everyone,
I would like some help getting several of my combo boxes on the form I'm building to autofill as the user types corresponding to the values in the drop down. Is there a way to do this. So for example if I have a combo list that has a bunch on names, the user can start typing in the name and if the first letter he types is 'r' then the first letter of names the combo box jumps to would be the 'R's. Then if the user types 'O' then the combo box would jump to names starting with 'RO' ... etc...
Whats a good way to do this??
Appreciate any help!!
:)

CreganTur
12-12-2008, 09:56 AM
What you're asking for is commonly referred to as autofill, but the property name for the combobox is Auto Expand. This property is under the Data tab of your combobox's property sheet. If it is set to yes, then 'autofill' will be enabled.

Now, this will not work on unbound objects. This means that your combobox must have a row source.

HTH:thumb

nathan2314
12-12-2008, 11:02 AM
Thanks!!
Umm now I have an issue due to the fact that it wont work on unbound. I'm glad you told me that b/c I couldn't figure out why when I was selecting 'yes' on the autofill it wasn't working.
Ok so how do I get it to work on a unbound combo box. Basically, what I'm trying to do is have several combo boxes that will be used as search criteria. Each of the combo boxes are based on a query b/c I would like the user to be able to select things like lastname, city, state etc ... and then hit a search command button that would do a query based on all the entries the user selected in the combo boxes. But the combo boxes are unbounded as they are based on other queries. For example, the lastname combo box shows a list of all last names in the main data table. There are ALOT of people so I would like the user to be able to just start typing the last name and the combo box do an autofill as the user types. Or is there a better way of doing searches like this based on mulitple search fields?
Please Help!!
: pray2:

CreganTur
12-12-2008, 12:23 PM
Can you post an example database?

OBP
12-15-2008, 09:11 AM
That is odd, I have Unbound Combos based on queries (so they have a row source, but no Control Source) and the Auto Fill works on them. :think:

nathan2314
12-15-2008, 09:46 AM
Actually you are correct.
I had put the field setting in the table design that particular field as all capital letters. For some reason this put a space in front of all the entries in the drop down list so the autofill wasn't working. Its working now.
Thanks!:)

CreganTur
12-15-2008, 09:49 AM
That is odd, I have Unbound Combos based on queries (so they have a row source, but no Control Source) and the Auto Fill works on them. :think:

Yeah... I confused Control Source and Row Source... can be unbound but still contain data
:mkay