IÆve seen a few of these type questions floating about so here are a few tips.
LetÆs call our forms myMainFrm and mySubFrm. Trying to use an expression like
Forms!mySubFrm![aControl] = aValue
from myMainFrm wonÆt work because when a mainform-subform is opened, only the main form figures as part of the Forms collection.
The correct syntax is
Forms!myMainFrm!mySubFrm![aControl] = aValue
which can be shortened to
Me!mySubFrm![aControl] = aValue
for procedures attached to myMainFrm. Essentially, the subform is just like any other control on the main form.
When in the subform, it is still only myMainFrm that figures as part of the Forms collection.
ôMeö however, as you would expect, refers to mySubForm.
So, to talk to myMainFrm from mySubFrm the correct syntax is
Forms!myMainFrm![anotherControl] = anotherValue
If the procedure is attached to mySubFrm then you could use ôMeö as follows:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.