Solved

Reorder all controls in form

Posted on 2014-01-06
2
377 Views
Last Modified: 2014-01-06
Hi Experts,

I'm using code

For Each ctl In Forms... to change the name of all the controls in a form.
That works fine, the problem is that the controls are in the wrong order, how do I change that? Changing the Tab Order doesn't work.

Gary
0
Comment
Question by:tbsgadi
2 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 39759301
The controls show up in the controls collection in the order they were created, so if you want to loop through them in a specific sequence (tab order), you are probably going to have to setup a temp table to store the name of the control and the tab order.  

Then create a recordset based on that table and sorted by tab order to get them in the sequence you want them in, before doing your sequential renumbering.
0
 
LVL 46

Author Closing Comment

by:tbsgadi
ID: 39759498
Thanks, I just found it easier to add the textboxes from scratch.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now