ComboBox Autofill

L

Lproth

The Autofill feature for my comboboxes "breaks" everytime I close the
database. This makes it difficult to use the data base because I have to sort
through a long list. When I put a new combobox on the form it works but
breaks again when I close the database. Help!
 
G

Gijs Beukenoot

Lproth had uiteengezet :
The Autofill feature for my comboboxes "breaks" everytime I close the
database. This makes it difficult to use the data base because I have to sort
through a long list. When I put a new combobox on the form it works but
breaks again when I close the database. Help!

Could you explain 'breaks'? In other words: What is it supposed to do?
 
S

Sprinks

Lproth,

Unless this is a bug, or you are opening from a different front-end
database, this feature is controlled by the AutoExpand property. Set it to
Yes in form design view, and save.

Hope that helps.

Sprinks
 
L

Lproth

I have the autoexpand property set to yes. I am sharing the database but I
don't have another front end.

So if it is a bug should reinstalling Access take care of the problem?
 
S

Sprinks

Lproth,

As I think the problem is with the database, rather than a corrupted Access
program, first try the following:

Open the form and right click on the combo box and choose Properties to
display its properties. What is the AutoExpand property set to? If it is
"Yes", but it still doesn't work, first try a Compact and Repair (Tools,
Database Utilities, Compact and Repair Database from the database window).
If that doesn't work, consider making a backup copy of the database,
recreating the form from scratch, verifying that it works as expected,
deleting the old form, Compact & Repair, and then renaming the new form to
the old name before reinstalling Access.

If it is set to No, I suspect that code on the form is setting the property,
most likely in the form's OnOpen or OnCurrent event procedures. Switch to
Design view and choose View, Code to view the form's module. Look for an
assignment to the combo box' AutoExpand property.

Hope that helps.

Sprinks
 
G

Gijs Beukenoot

Lproth formuleerde op dinsdag :
I have the autoexpand property set to yes. I am sharing the database but I
don't have another front end.

So if it is a bug should reinstalling Access take care of the problem?

Ah, that autofill... OK, are there any records in the combo? What you
coul'd do is to setup some code on the gotfocus event and breakpoint
there. Then examine the properties (if they are still correct) and
check the contents of the box (see if what you type _is_ in there).
If you bound the combo to a query including an ID, make sure the field
you type is 'at the beginning' of the text that the combo shows
(setting the width of the ID to 0)
Hope this makes any sense...
 
L

Lproth

Thanks. It was a bug in the programming. I rewrote most of the code and it is
working now.
 
Top