How to requery Unbound subform based on List and Combo Box Filters

D

DOYLE60

I have an unbound dialog from with a subform on it. My filters use both combo
boxes and list boxes. My combo boxes are filtered on a query on the criteria
row. My list boxes are filtered by drawing up a query that is based on the
list box selections, so not on the criteria row.

The report that opens from the dialog form works wonderfully and filters
properly.
The subform is based on the very same query as the report.

However, I can't seem to make this subform filter correctly. I am using a
button to update the subform. After selections are made by the user, a command
button is pressed. The command button has code on it to first update the
listboxes (long code that works) and then to requery the subform. This last is
simply: Child83.Requery.

However, only the filters from the combo boxes are filtering. The listboxes
are not filtering. I tested the listbox filters and see that the queries are
updating, but still the subform doesn't fully update.

It seems impossible to my mind that this is happening. I read all about
requeires and repaints and refreshes and can't seem to get it right.

I know that the data is truly being updated because when I go to the design
view of the main form and go right back to the form view, the data is properly
filtered by the combos and the list boxes.

It seems my requery needs to be of some sort of higher voltage. How do I shock
it?

Thanks,

Matt
 
D

Duane Hookom

What is the record source of the subform? Where is your code that requiries
the subform?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top