Hi everyone.
I have a few subforms in the main form that are dependent on each other with their data (not with child/master fields). Sometimes I get an invalid reference error because the referenced subform isn't loaded (yet). To make them load in the correct order I need to delete them all, then insert them one by one in a correct order. If, later on, I decide to edit one of them of or send it to background, the order breaks and once again do I get the error.
I've tried to determine the correct loading order with this code on the main form On Load event but to no avail:
(getting an error that the following action can't be done because it can't find the subform.)
Does anyone know what can be done?
Thanks a lot,
Michael.
I have a few subforms in the main form that are dependent on each other with their data (not with child/master fields). Sometimes I get an invalid reference error because the referenced subform isn't loaded (yet). To make them load in the correct order I need to delete them all, then insert them one by one in a correct order. If, later on, I decide to edit one of them of or send it to background, the order breaks and once again do I get the error.
I've tried to determine the correct loading order with this code on the main form On Load event but to no avail:
Code:
Forms!frmMain!sfrmForm1.Form.RecordSource = "RecordSource1" DoEvents Forms!frmMain!sfrmForm2.Form.RecordSource = "RecordSource2" DoEvents
Does anyone know what can be done?
Thanks a lot,
Michael.
Comment