Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

form.control(index)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dsperry101 - 24 Jul 2007 11:18 GMT
Hello all,

       Is it possible to change the index of a control on a form. I guess
access numbers them incrementally as they are created. For instance group all
the text boxes in a sequential block .

Dan S

Signature

Danny C. Sperry

Klatuu - 24 Jul 2007 14:22 GMT
That is something you cannot control.
Signature

Dave Hargis, Microsoft Access MVP

> Hello all,
>
[quoted text clipped - 3 lines]
>
> Dan S
David W. Fenton - 24 Jul 2007 17:04 GMT
> That is something you cannot control.

You can change the index by altering the z-order with
send-to-front/back.

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

Klatuu - 24 Jul 2007 14:22 GMT
Opps.. Hit Post too soon.
What is it you want to do?  There may be another way.
Signature

Dave Hargis, Microsoft Access MVP

> Hello all,
>
[quoted text clipped - 3 lines]
>
> Dan S
OldPro - 24 Jul 2007 14:48 GMT
On Jul 24, 5:18 am, "Dsperry101 via AccessMonster.com" <u24149@uwe>
wrote:
> Hello all,
>
[quoted text clipped - 8 lines]
>
> Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200707/1

There is no index other than the name.  You can choose the name and
use code to position them.  For example, you could have 20 labels
named lblGridR1C1 to lblGridR4C5, and then position them with a couple
of FOR loops.   Each label can be addressed like the following
example:  Me("lblGridR2C3").top=Me("lblGridR1C3").top +
Me("lblGridR1C3").Height
Is this what you were looking for?
David W. Fenton - 24 Jul 2007 17:03 GMT
> On Jul 24, 5:18 am, "Dsperry101 via AccessMonster.com"
> <u24149@uwe> wrote:
[quoted text clipped - 4 lines]
>
> There is no index other than the name.

Of course there is! Every collection is addressable by index number
and by key. In the case of controls, the name is the key value, but
the index number is available, as well.

If you want to change the index number of already-created controls,
you need to change the z-order, by doing send-to-front/send-to-back
in the order that you want the controls to be in the index.

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.