Determine which section of a form contains a control

  • Follow


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.
0
Reply Utf 1/14/2010 12:20:01 AM

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.

"Me.Frustrated = True" <MeFrustratedTrue@discussions.microsoft.com> wrote in 
message news:299A070B-EB51-4370-B104-F0C42C784732@microsoft.com...
> 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. 


0
Reply Jeff 1/14/2010 12:38:54 AM


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 wrote:
>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
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201001/1

0
Reply Clifford 1/14/2010 1:10:32 AM

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" wrote:

> 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 wrote:
> >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
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201001/1
> 
> .
> 
0
Reply Utf 1/14/2010 7:15:01 AM

Hi,

     You are welcome.

                     Clifford Bass

Me.Frustrated = True wrote:
>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.

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201001/1

0
Reply Clifford 1/14/2010 2:52:59 PM

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" <MeFrustratedTrue@discussions.microsoft.com> wrote in 
message news:DF6E56CD-5013-4F40-9145-85E39DC64F1D@microsoft.com...
> 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" wrote:
>
>> 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 wrote:
>> >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
>> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201001/1
>>
>> .
>> 


0
Reply Jeff 1/14/2010 6:04:09 PM

5 Replies
154 Views

(page loaded in 0.238 seconds)

Similiar Articles:
















7/26/2012 8:58:23 PM


Reply: