View Full Version : Combo Box Requery only works the first time?


itchy
02-09-2001, 12:28 PM
I have a combo box on a form that displays company names (data comes from a query). The form contains a subform that has another combo box with contact names (also from the same query). I have set up the query to get the parameter for the company name from the first combo box, the afterupdate of this combo box runs a requery to produce the names for the second combo box. The problem is this, if you select a company from the drop down list and then go to the contact name list, the correct names are listed. However, if you do not select any names (assume you have chosen the wrong company and did not find the name you were looking for) and then return to the company name combo box and select a different company, the second combo box (contact names) is not updated. Do I have to place a requery statement in any of the other events in the first combo box?

Rich
02-09-2001, 03:15 PM
Try moving the code to the on change event.

itchy
02-12-2001, 03:53 AM
Nope. Tried it, it does the same thing. I'm really stumped on this one! Thanks anyway!

Chris RR
02-12-2001, 04:56 AM
I'd leave everything in the after update of the first combo box.

Have you tried putting a me.repaint after the requery for your second combo box?