[AccessD] How to control subforms loading order?

Drew Wutka DWUTKA at marlow.com
Thu Jun 5 19:34:13 CDT 2003


Ya, just set the subforms on the forms OnLoad or OnOpen events.  Leave the
subform control in place, but remove what form it's loads.  Then you can
have it load in whatever order you want through code.
 
Drew

-----Original Message-----
From: Philippe PONS [mailto:Philippe.Pons19 at wanadoo.fr]
Sent: Thursday, June 05, 2003 10:19 AM
To: AccessD at databaseadvisors.com
Subject: [AccessD] How to control subforms loading order?


Hi,
 
I have a form with two embedded subforms.
 
On the OnCurrent event of the first subform, I synchronise the second one
using the Filter and OnFilter properties of it.
This works fine, but generates an error the first time the Form is loaded.
This is because I reference the second subform, but at this time it is not
yet loaded.
 
I found a workaround by removing the first subform from the main form and
reinserting it, as it seems Access loads the subforms in the same order at
which they have been inserted.
 
However, I would like to have a more robust way of controling the loading
order.
 
Do you have a better solution?
 
Thanks in advance,
 
Philippe.
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030605/91435457/attachment-0001.html>


More information about the AccessD mailing list