Hello All,
I am working on vb code for a MAccess form that would enable/disable editing on toggle. This button lives on the main form, so it needs to reference everything from there.
There is a main form, a sub form, and a sub-sub form. The code works perfectly for the main form and subform, but I am unable to get the reference right for the sub sub form. I have read about 10 blog posts about how to reference properly and tried each suggestion but I keep getting an error "You entered an expression that has an invalid reference to the property Form/Report."
Here are the references I have attempted as well as the results of the attempt:
Me.subform1.Form!subform2.Form.AllowDeletions = Me.tog_AllowEdits --> No
Me.subform1.Form.subform2fsub_Observation.Form.AllowDeletions = Me.tog_AllowEdits --> Worked once, and then stopped working???
Me!subform1.Form.subform2.Form.AllowDeletions = Me.tog_AllowEdits --> No
Me!subform1.Form!subform2.Form.AllowDeletions = Me.tog_AllowEdits --> No
---------
This is just a portion of the code of course. The subforms are named more meaningfully that shown above. I know that nested subforms are rare... but in this case they are necessary.
Thank you in advance!!!!!
:banghead::banghead::banghead:
Ken
I am working on vb code for a MAccess form that would enable/disable editing on toggle. This button lives on the main form, so it needs to reference everything from there.
There is a main form, a sub form, and a sub-sub form. The code works perfectly for the main form and subform, but I am unable to get the reference right for the sub sub form. I have read about 10 blog posts about how to reference properly and tried each suggestion but I keep getting an error "You entered an expression that has an invalid reference to the property Form/Report."
Here are the references I have attempted as well as the results of the attempt:
Me.subform1.Form!subform2.Form.AllowDeletions = Me.tog_AllowEdits --> No
Me.subform1.Form.subform2fsub_Observation.Form.AllowDeletions = Me.tog_AllowEdits --> Worked once, and then stopped working???
Me!subform1.Form.subform2.Form.AllowDeletions = Me.tog_AllowEdits --> No
Me!subform1.Form!subform2.Form.AllowDeletions = Me.tog_AllowEdits --> No
---------
This is just a portion of the code of course. The subforms are named more meaningfully that shown above. I know that nested subforms are rare... but in this case they are necessary.
Thank you in advance!!!!!
:banghead::banghead::banghead:
Ken