reference a Subform from Another Subform (1 Viewer)

ddrew

seasoned user
Local time
Today, 04:11
Joined
Jan 26, 2003
Messages
911
Hi, I have two subforms on a Main from. I need to reference one from the other to requery it.
Ive tried this, but it dosent work:
Code:
Me.Parent.frm_Main!frm_Subform2.Requery
Can someone put me right please
 

speakers_86

Registered User.
Local time
Yesterday, 23:11
Joined
May 17, 2007
Messages
1,919
Try this

Code:
me.parent!frm_subform2!form.requery

I think that will work. I'm not entirely sure about the bangs and dots though.
 

ddrew

seasoned user
Local time
Today, 04:11
Joined
Jan 26, 2003
Messages
911
Nope, that didn't work!
 

hfrupn

New member
Local time
Today, 11:11
Joined
Jan 8, 2012
Messages
3
I use this with good results
[Forms]![frmParent]![frmSubform2].Requery

If you have a parent form with multiple sub-forms use a separate line for each form to be re-queried, e.g.
[Forms]![frmParent].Requery
[Forms]![frmParent]![frmSubform1].Requery
[Forms]![frmParent]![frmSubform2].Requery
 

Users who are viewing this thread

Top Bottom