S
Sasquatch
I have a form in Access XP(2002) that contains an unbound subform when it is
initially opened. There are also 15 buttons on the form that will each load
a different subform when clicked. All of the subforms are the same width but
each have a different height. I would like to be able to adjust the height
of the subform control on the main form to be slightly larger than the
subform that is loaded when one of the buttons are clicked.
I know that I could just look up each subform's height and hard code it
under each button, but I would like to retrieve the subform's height in code
and set it that way.
I've looked into reteiving the subforms height using the AllForms collection
with something like this:
lgnHeight =
CurrentProject.AllForms("SubFormName").Properties("Height").Value
but I get the error: "2455: You entered and expression that has an invalid
reference to the property 'Height'.
Can anyone give me some insight on how to find a form's height in the
database before it is loaded or find a subform's height (not the control)
once it is loaded?
Thanks.
initially opened. There are also 15 buttons on the form that will each load
a different subform when clicked. All of the subforms are the same width but
each have a different height. I would like to be able to adjust the height
of the subform control on the main form to be slightly larger than the
subform that is loaded when one of the buttons are clicked.
I know that I could just look up each subform's height and hard code it
under each button, but I would like to retrieve the subform's height in code
and set it that way.
I've looked into reteiving the subforms height using the AllForms collection
with something like this:
lgnHeight =
CurrentProject.AllForms("SubFormName").Properties("Height").Value
but I get the error: "2455: You entered and expression that has an invalid
reference to the property 'Height'.
Can anyone give me some insight on how to find a form's height in the
database before it is loaded or find a subform's height (not the control)
once it is loaded?
Thanks.