Determine which section of a form contains a control

  • Thread starter Thread starter Me.Frustrated = True
  • Start date Start date
M

Me.Frustrated = True

Is there a way to find out programmatically whether a control is in the
form's header, footer, or detail section? I can't see anything in the
control's properties that indicates this.
 
I'm trying to visualize a situation for which I'd need to locate a control
(as opposed to already knowing where it was)...

Help!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Thanks Clifford, this worked.
For Jeff Boyce, I have a couple of functions that magnify and de-magnify all
the controls and the "Details" section on a form for a vision-impaired user
at the click of a button. I wanted to exclude all the controls on the header
and footer in my code, and Clifford's suggestion worked.

Clifford Bass via AccessMonster.com said:
Hi,

Certainly. Suppose a button named "Command10" with an On Click event:

Private Sub Command10_Click()

MsgBox Me.Section([Command10].Section).Name

End Sub

Clifford Bass

Me.Frustrated = True said:
Is there a way to find out programmatically whether a control is in the
form's header, footer, or detail section? I can't see anything in the
control's properties that indicates this.

--
Message posted via AccessMonster.com


.
 
Thanks for the clarification. I learned something new today!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

Me.Frustrated = True said:
Thanks Clifford, this worked.
For Jeff Boyce, I have a couple of functions that magnify and de-magnify
all
the controls and the "Details" section on a form for a vision-impaired
user
at the click of a button. I wanted to exclude all the controls on the
header
and footer in my code, and Clifford's suggestion worked.

Clifford Bass via AccessMonster.com said:
Hi,

Certainly. Suppose a button named "Command10" with an On Click
event:

Private Sub Command10_Click()

MsgBox Me.Section([Command10].Section).Name

End Sub

Clifford Bass

Me.Frustrated = True said:
Is there a way to find out programmatically whether a control is in the
form's header, footer, or detail section? I can't see anything in the
control's properties that indicates this.

--
Message posted via AccessMonster.com


.
 
Back
Top