S
sturgel
How can I do the following? I tried just about everyway that would seem
logical but I still get error 438 "Object doesn't support this proerty of
method" or "You entered an expression that has an invalid reference to the
property Form/Report".
I have a subform (subsubform) within another subform on a main form. I am
trying to set the AllowEdits property of the subsubform in the main form
using a module subroutine. I've tried numerous ways to do this but get the
above errors. I am using the following variables for each form:
frmActive = the Main Form
subctl = the Sub Form
subsubctl = the Sub Sub Form (nested subform within subctl)
My last attempt was this:
Forms(frmActive.Name).Controls(subctl.Name).Controls(subsubctl.Name).allowedits
How do you access a subform form within a subform form using variables for
the form objects?
I am trying to do this in a subroutine in a module using the following
nested loops.
For Each subctl In frmActive
If TypeOf subctl Is SubForm Then
subctl.Form.AllowEdits = True <------- WORKS!
For Each subsubctl In subctl.Form
If TypeOf subsubctl Is SubForm Then
subsubctl.Form.AllowEdits = True <---- FAILS!
end if
Next
end if
Next
Can you use the code above to determine a solution?
Thanks!
logical but I still get error 438 "Object doesn't support this proerty of
method" or "You entered an expression that has an invalid reference to the
property Form/Report".
I have a subform (subsubform) within another subform on a main form. I am
trying to set the AllowEdits property of the subsubform in the main form
using a module subroutine. I've tried numerous ways to do this but get the
above errors. I am using the following variables for each form:
frmActive = the Main Form
subctl = the Sub Form
subsubctl = the Sub Sub Form (nested subform within subctl)
My last attempt was this:
Forms(frmActive.Name).Controls(subctl.Name).Controls(subsubctl.Name).allowedits
How do you access a subform form within a subform form using variables for
the form objects?
I am trying to do this in a subroutine in a module using the following
nested loops.
For Each subctl In frmActive
If TypeOf subctl Is SubForm Then
subctl.Form.AllowEdits = True <------- WORKS!
For Each subsubctl In subctl.Form
If TypeOf subsubctl Is SubForm Then
subsubctl.Form.AllowEdits = True <---- FAILS!
end if
Next
end if
Next
Can you use the code above to determine a solution?
Thanks!