PC Review


Reply
Thread Tools Rate Thread

How to obtain the location of a specified control in a form in Acc

 
 
form control location Access
Guest
Posts: n/a
 
      14th Sep 2009
I've already defined these variables:
Microsoft.Office.Interop.Access.Application oAccess,
Microsoft.Office.Interop.Access.Form oForm,
Microsoft.Office.Interop.Access.Controls oCtls, and had assigned them correct
values;

Now I can use a method to get the properties of a specified control such as
Caption,Font and so on like this: Microsoft.Office.Interop.Access.Lable
lable=(Microsoft.Office.Interop.Access.Label)oCtls["LableName"];
But I don't know how to determine whether a control is located in a
specified area(eg. form header/footer, page header/footer or form body), or
in another way, how to examine the target area to confirm whether my target
control exists?

Thank you for your kindly help!
 
Reply With Quote
 
 
 
 
Steve Sanford
Guest
Posts: n/a
 
      14th Sep 2009
Look at the Section Property in help. I found it by entering

MsgBox Me.Text0.Section


in a procedure, then clicking on "Section" and pressing the {F1} key.



From Help:

"You can use the Section property to identify a section of a form or report
and provide access to the properties of that section. You can also identify
controls by the section of a form or report where the control appears."


HTH
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


"form control location Access" wrote:

> I've already defined these variables:
> Microsoft.Office.Interop.Access.Application oAccess,
> Microsoft.Office.Interop.Access.Form oForm,
> Microsoft.Office.Interop.Access.Controls oCtls, and had assigned them correct
> values;
>
> Now I can use a method to get the properties of a specified control such as
> Caption,Font and so on like this: Microsoft.Office.Interop.Access.Lable
> lable=(Microsoft.Office.Interop.Access.Label)oCtls["LableName"];
> But I don't know how to determine whether a control is located in a
> specified area(eg. form header/footer, page header/footer or form body), or
> in another way, how to examine the target area to confirm whether my target
> control exists?
>
> Thank you for your kindly help!

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control of save location and name of form Graham Mayor Microsoft Word Document Management 1 26th Oct 2006 04:59 PM
Scrolling changes location of the control on the form. Just Me Microsoft VB .NET 0 5th Feb 2005 03:21 PM
Control location problem on a form ( C# ) =?Utf-8?B?TWlrZQ==?= Microsoft C# .NET 7 30th Jun 2004 09:38 PM
Control location problem on a form ( C# ) =?Utf-8?B?TWlrZQ==?= Microsoft Dot NET Framework Forms 0 29th Jun 2004 12:01 AM
setting the location of a web form control Billy Cormic Microsoft VB .NET 0 27th Nov 2003 09:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:54 PM.