I've got three forms on a Main form: Activity, Milestone, NextStep.
They are linked hierarchically, but not using parent child, because they aren't subform relationships. When Activity is current, it requeries Milestone, which requeries NextStep, pulling up the nested/associated records for both.
I want to roll up the highest priority from NextStep to Milestone and then to Activity.
The queries to do this work have a problem. If I put the maxpriority of Milestones associated with forms!Activity.ActivityID = MilestoneActivityID in the Recordsource for Activity, then it fails on form load because form Activity is not open. The recordsource can't find Activity so it can't find the current Activity form record ActivityID value to use to filter Milestone priorities to generate the maxpriority.
I built at test button, so I can load Activity without the maxpriority in the recordsource, then push the button and switch the Activity record source to include maxpriority. That works fine; the appropriate maxpriority values from associated Milestone records appear in Activity.
I can't figure out a way to do this automatically on form load or open without the button. I tried to use the AfterFinalRender event, but it failed.
When I think about it, I can't see how it could possible NOT be a circular reference problem, because the recordsource references the form VALUES, which depend on the recordsource. Of course I may be missing something obvious, like record current, that fires later?
Otherwise I'm thinking there would have to be some sort of timed event, or some other manually triggered event, like my button or maybe recordcurrent.
Any suggestion on this would be appreciated.