Refresh one subform from another subform

D

Dkline

I have a form with two subforms. I make a selection in one subform and want
the other subform to reflect the change on the click event.

If I manually return to the main form and then select Records/Refresh from
the menu, the second subform gets updated.

My problem is I can't figure out how to have the event in the first subform
do the refresh for me.

I've tried Me.Parent![form name].refresh

I've tried Forms!...

I'm figuring since the event is on the one subform I may have to drill up to
the main form and then back down to the second subform to do the refresh. Or
is it enough to drill up to just the main form and refresh from there.
 
A

Andi Mayer

I have a form with two subforms. I make a selection in one subform and want
the other subform to reflect the change on the click event.

If I manually return to the main form and then select Records/Refresh from
the menu, the second subform gets updated.

My problem is I can't figure out how to have the event in the first subform
do the refresh for me.

I've tried Me.Parent![form name].refresh

I've tried Forms!...

I'm figuring since the event is on the one subform I may have to drill up to
the main form and then back down to the second subform to do the refresh. Or
is it enough to drill up to just the main form and refresh from there.
try: Me.Parent!subFormControl.form.refresh
 
D

Dkline

I get a error 2465 - can't find the field. Line is below:

Me.Parent!frm_qry_tblPolicyNumberInsureds_ByPN.Form.Refresh

Andi Mayer said:
I have a form with two subforms. I make a selection in one subform and
want
the other subform to reflect the change on the click event.

If I manually return to the main form and then select Records/Refresh from
the menu, the second subform gets updated.

My problem is I can't figure out how to have the event in the first
subform
do the refresh for me.

I've tried Me.Parent![form name].refresh

I've tried Forms!...

I'm figuring since the event is on the one subform I may have to drill up
to
the main form and then back down to the second subform to do the refresh.
Or
is it enough to drill up to just the main form and refresh from there.
try: Me.Parent!subFormControl.form.refresh
 
A

Andi Mayer

I get a error 2465 - can't find the field. Line is below:

Me.Parent!frm_qry_tblPolicyNumberInsureds_ByPN.Form.Refresh
your subForm-Control.name =frm_qry_tblPolicyNumberInsureds_ByPN ??

the name of the control(on the mainForm) in which the form (the
subform) is
 

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