Thread: Sub Sub form reference
09-17-14, 09:01 #1Registered User
- Join Date
- Mar 2014
Unanswered: Sub Sub form reference
I am working on vb code for a MAccess form that would enable/disable editing on toggle.
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.All owDeletions = 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!!!!!
09-18-14, 07:41 #2Registered User
Provided Answers: 2
- Join Date
- Apr 2004
- Derbyshire, UK
May be this would work
Me.subform1.Form.subform2.Form.fsub_Observation.Fo rm.AllowDeletions = Me.tog_AllowEdits
Obviously this is untried!