Basically, I have a main form with a combo box and three subforms. Subform1 is populated by a query which returns records based on the value in the combo box. Subform2 is logically a child of Subform1 but is placed on the main form. Subform3 is logically a child of Subform2, but again sits on the main form. The main reason the various subforms are all on the main form is one of design; putting each subform in the header/footer section of its parent would produce a horrible-looking form.
So the subset of records displayed in Subform3 can change when either the record selected in Subform2 changes; when the record in Subform1 changes or when the combo box value on the main form is changed.
This is one of those questions that has bugged me for ages: is there an easy way, within a subform itself, of trapping when its recordset is refreshed as a result of something that happens in one of its parents.
I know the form’s Current event will fire after this has happened because the current record has changed, but obviously it also occurs when moving from record to record. I would really like to be able to keep the code in the subform so that (a) as much of its necessary code is encapsulated within the subform itself and ( if I use the subform elsewhere, I don’t have to start including extra code in the forms I drop it on.
Many thanks,
Simon