Combo Box not working on Form

HAFPT

Registered User.
Local time
Today, 21:00
Joined
Oct 30, 2003
Messages
23
I created a form to look up sales orders. One of the combo boxes (Country filter for looking up orders) is not working properly. I can look up values with the combo box but when I tab to the next field it blanks out. Or if I stay on the Combo box after finding the correct Country value then hit the Search command button the value disappears but the search works using the country value. When you click back in the field you can tell there is something in the field by where the cursor is, then if you backspace the value appears again missing the last charater.

I've tried recreating the combo box but nothing changes. Other combo boxes on this form work, even after recreating them.

Does anyone have any ideas on what is causing this?
 
There are several things you should try researching.

1) Is the Combo Box a bound control. If you are using it to filter records it should be an unbound control. If it is bound, the value is controlled by the value in the current record.

2) Do you have any code on the Before Update or After Update Events? Code on any event that is executed after you select a value can affect the value in the control.

3) Do you have any code on the Enter or Click Events? THese could affect the value that is being displayed when you enter the Combo Box.

4) What is the Row Source of the Combo Box based on? Is it a table or query? Is it a value list. I would also display your row source and click on the displayed field to see what happens. If the value is displayed, then the problem is probably somewhere on your form.

Let me know what you discovered.

Good Luck
 
Thanks for the ideas and this is what I have/found:

The combo box is bound.

No Before or After Update Events for this property or on any other property on the form.

No Enter or Click Events for this combo box property but I have other Command Buttons with On Click Events. The Search button that puts all these filters together to search the DB.

Row Source is based on a Query, yes a value list. List displays fine. So I guess I have a Form problem.
 
Combo Boxes used for filters should not be bound. You may have a bound Combo Box on your form to enter an order's Country, but you should not use it for filtering.

Either change your combo box so it is not bound, or create a second combo box that is unbound to be used for filtering.

You may use this site's Search capability. This is a common problem and there are several posts there describing how to use combo boxes for filtering.
 
On further review the country Combo Box is Unbound.

SO it looks like the combo box is setup right and it's a Form issue. Can A Form get corrupt?
 
Of Course, you're using MS Access. If the form is corrupt, here are some things to try.

1) First do a repair & compact. Often (but not always) this will resolve corruptions.

2) Decompile the Database. Most of the time, this will resolve corruptions. Go to the command prompt (Start | Run | cmd) and enter:

"C:\program files\Microsoft Office\Office\msaccess.exe" <Database Path Name> /DECOMPILE

1) If these don't work, create a new blank database, and import all objects from your current database to the new database. Importing objects forces MS Access to repair corruptions.

Sometimes none of these will work. If that happens you may need to recreate the form from scratch. You may want to create a blank new form and enter the recordsource and the combo boxes that are creating the problem and testing it before doing the whole form.

Good Luck!
 
Thanks for your help on this.

I'll try these and see if I can't fix this. I'll let you know where Iget to with these.
 

Users who are viewing this thread

Back
Top Bottom