Full Version: Subform Requery not working
UtterAccess Forums > Microsoft® Access > Access Forms
Hi, first post here. Thanks in advance.
I am creating an unbound form with a bound subform. The Main Form contains critera in list boxes and drop downs and feeds the criteria chosen to the query the subform is based on. I had been using Me.SubFormName.Requery (yes, I used the Name of the Subform) to update the subform in an AfterUpdate Event...No Problems.
Othen added a list box for multiple selection that creates a query which limits more of the criteria in the original query.
Here's where is gets wierd.
In the multiple selection listbox my requery is not updating the subform, but if I proceed to change one of my original 'single selection listboxes' the data changes, but it is based on information pre-'multi select'. If I open the subform as a stand alone, the data is correct, but the data in the subform is incorrect. Or if I close and reopen the mainform, it changes.
Is it possible the underlying query on the subform does not recognize the changes in the limiting query I created?
Any thoughts?
Welcome to Utter Access.
I'm sorry your post was not answered sooner.
Obelieve the issue is that you have a multiple selection list box and the values selected in it must be identified differently from selections in a single selection listbox.
However, I find it a bit abstract to talk about this without seeing the actual forms. Can you post up a copy with sample data (remove any sensitive data and leave enough sample data to illustrate how it should work.)?
Thanks for the reply, but I did find a solution by redefining the subform's source using
e.SubformName.Form.RecordSource = "SubformSource"
This refreshed the query with the new information, though I'm not sure that it is the most efficient solution.
Glad to hear you found a solution.
est wishes for continued success.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.