PDA

View Full Version : Solved: SubForm Sub Reference



akn112
10-02-2007, 08:52 AM
Hey all, quick question. Was wondering how ur supposed to reference a sub within a subform? I have a save button on my main form and i have a save sub within my subform. in the on_click event, i want it to run the save in my subform. So far i've tried

sfrmRequester.saveme ->throws error
forms!sfrmrequester.saveme ->doesnt run but no error
me.sfrmrequester.?? ->not sure which to chose, so many properties.

thanks!

Oorang
10-02-2007, 09:54 AM
Assume you subform control Form1 (Note you use the subform control name, not the name of the form the subform control pulls in.) Further assume the check box is Check1.
Me.Form1.Controls("Check1").Value = True

More here (http://support.microsoft.com/kb/209099).

(http://support.microsoft.com/kb/209099)

akn112
10-02-2007, 10:04 AM
thanks Aaron! got it working

me!sfrm.form.save