I have several forms which contain a set of controls I need to manipulate in VBA. The set of controls are located on the main form (forms that do not have a subform), and on the subform of another form (2 other forms actually).
I need to create a public procedure that will modify the controls' properties based on which forms are being used. Is there a way to create a single common public procedure that will accommodate both the main form and the subforms?
Example code if it were run independently in different procedures:
Forms!frmMainNoSfrm.cmdControl.Enabled = False
Forms!frmMainWithSfrm
.frmSubform.Form.cmdControl.Enabled = False
Thanks!
I need to create a public procedure that will modify the controls' properties based on which forms are being used. Is there a way to create a single common public procedure that will accommodate both the main form and the subforms?
Example code if it were run independently in different procedures:
Forms!frmMainNoSfrm.cmdControl.Enabled = False
Forms!frmMainWithSfrm
.frmSubform.Form.cmdControl.Enabled = False
Thanks!