<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META content="MSHTML 6.00.2722.900" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=729343300-06062003><FONT face=Arial color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=729343300-06062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=729343300-06062003><FONT face=Arial color=#0000ff
size=2>Drew</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Philippe PONS
[mailto:Philippe.Pons19@wanadoo.fr]<BR><B>Sent:</B> Thursday, June 05, 2003
10:19 AM<BR><B>To:</B> AccessD@databaseadvisors.com<BR><B>Subject:</B>
[AccessD] How to control subforms loading order?<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a form with two embedded
subforms.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>On the OnCurrent event of the first
subform, I synchronise the second one using the Filter and OnFilter
properties of it.</FONT></DIV>
<DIV><FONT face=Arial size=2>This works fine, but generates an error the first
time the Form is loaded.</FONT></DIV>
<DIV><FONT face=Arial size=2>This is because I reference the second subform,
but at this time it is not yet loaded.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>However, I would like to have a more robust way
of controling the loading order.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Do you have a better solution?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Philippe.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>