Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Reorder all controls in form

Posted on 2014-01-06
2
Medium Priority
?
433 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 49

Accepted Solution

by:
Dale Fye earned 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

885 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