Using MS Access/Navigation Form - Requery Subform
Thank you for your previous help on my bowling database.
Previously, I had chatted with you about having a tab control on a form with tabs for my 14 teams. I knew I would have 14 forms become subforms in the tab control on a form, but I did not want 14 queries.
However, I decided to have one form in which I would requery each time I wanted to look at a new teamís recap. I built my form (RecapSheet), I put it on a tab control in my form (ScoreEntry) along with other forms making up other tabs.
The tab for my (RecapSheet) form is called( Recaps) and it has an option group on it (TeamList) made up of buttons for each team and when one is clicked, the After Update Event for (TeamList) runs, which requeries the query (Recap).
My code on the After Update Event on (TeamList) is:
My criteria in the query (Recap) is:
It all works fine.
Then I put my form (ScoreEntry) on the newly built navigation form and it no longer works.
I have spent hours googling the correct syntax to use on a subform of a navigation form but nothing works.
Iím so lost in main form, subform, subform2, navigationsubform that I don't know if Iím coming or going.
I was hoping to use the navigation form in place of a switchboard menu. I like the look and feel of the navigation form better.
Thank you! Robecca
Referencing a subform especially nested subforms can be an exercise in futility. You need to remember that the Nav form is just another control and has to be referenced in sequence with other controls.
So you start with the Forms collection and the name of the main form:
then you build on it by naming the subform controlname:
The next step if to identify the collection the control is part of:
Finally, you add the property you want to reference. If you are dealing with a nested subform, you need to start the process, by naming the control and then collection.
You can try using the Expression builder to build the string of references.
Hope this helps,
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA