The subform reference syntax is like
Forms!frmFormName.SubformControlName.Form then the property or thing (control) you're trying to affect. As in
Code:
Forms!frmFormName.SubformControlName.Form.AllowEdits = False
SubformControlName is the name of the control containing the subform, not the subform name.
The idea seems a bit strange. Why have a call for this on every form, especially the current event? It will fire each time the main forms current event fires, which might be often.
If there is one thing that drives this need (say a form control value changes) just cycle through all the open forms and affect them in one go. If you're not OK with what you're doing, elaborate on the process. Any other suggestions will depend on what it is you're doing - and maybe why, because oddly enough, a subform doesn't appear in an enumeration of open forms when it's only loaded by its parent form.
Last edited by Micron; 09-25-2017 at 05:57 PM.
Reason: added info
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.