Ordering Controls Speed Up Remote Databases

<< Click to Display Table of Contents >>

Navigation:  Other Topics > Smart Access 1996-2006 > Jul-2003 >

Ordering Controls Speed Up Remote Databases

Christopher Weber

Chris Weber returns to his list of most asked questions to

address some pressing issues for Access developers. This

month he looks at managing your control’s tab order, provides

an easy solution for an annoying Access bug, and shows an

easy way to improve performance when retrieving large

recordsets from remote computers.

 

I have numerous forms to build that will display various

fields from my tables in columns. I break them down into

logical groups using pages on tab controls as I build the

forms, but setting the tab order on each tab is a pain. First,

I have to select the tab page that they’re on, and then I

select Tab Order... from the View menu. There are too

many controls on each page to view through the Tab Order

dialog, which won’t expand. If I click the Auto Order button

it orders them left to right, and then top to bottom. Is there

an easier way?

 

Whenever I find myself spending inordinate amounts of

time on a repetitive task like you’ve described, I consider

building my own tool to do the job. In this case, I just

happen to have built what you need for a project last year.

My client’s changing requirements were driving me crazy

as he kept tinkering with the form colors and moving the

order of the controls on the screen and forgetting to fix the

tab order.

 

You can use my SetTabsInPhoneBookOrder()

routine in the sample database (in the Download file

that’s available at www.smartaccessnewsletter.com) to

set the tab order to “phonebook column order” for all

the controls on a form or just a page’s controls. You

should be able to use the procedure as is, but for

those who like to look under the hood, I’ll give a

brief explanation.

 

The procedure begins by accepting the name of the

form you want to work with and, optionally, the name of

a page on a tab control. It opens the form whose name

you’ve passed in and then re-dimensions a variant array,

avarCtls, giving it three columns and no rows. If the

optional varPageName parameter is missing, the code

uses a For Each loop to examine all of the controls on...

 

Read more in pdf