load a subform

G

Guest

I have a subform linked to a main form on ClientID. The main form is unbound,
so the ClientID loads after the form is open. The subform is bound. How do I
get the subform to load after the Main form ClientID is available? I tried
subform.Requery with no results.

I know how to load an unbound subform and could take the subform to unbound.
But I thought I would first explore keeping the subform bound.

Thanks!!
 
G

Guest

I have few forms of a sort, what I did is make the subform unbound, on the
open event of the form after assigning values to the main form, I assign the
name of the subform
me.subformname.SourceObject = "FormName"

Using the requery, it mean loading the form twice, which is unnecessary. so
it better to avoid it, so the form will load quicker.
 
M

Marshall Barton

smk23 said:
I have a subform linked to a main form on ClientID. The main form is unbound,
so the ClientID loads after the form is open. The subform is bound. How do I
get the subform to load after the Main form ClientID is available? I tried
subform.Requery with no results.

I know how to load an unbound subform and could take the subform to unbound.
But I thought I would first explore keeping the subform bound.


From what I can tell, you just need to set the subform
control's Link Master property to the main form ClientID
text box and set the Link Child property to the
corresponding field in the subform's record source
table/query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top