Kenneth Ismert
kismert at gmail.com
Fri Oct 23 18:52:09 CDT 2009
Hey, all: Charlotte Foust: > If you're talking about in design view, the controls follow the > order in which they were added, not the tab index, which > can be changed. That is right initially, but the rendering order determines the Controls collection order. Using the Bring to Front and Send to Back buttons in form design view changes the control order. This is how Access handles control overlap without a z-index property: controls later in the collection render on top of those before. I'm pretty sure of this. Tab indexes, on the other hand, get re-used by section and tab page. This means that if your form has header, footer and detail sections, as well as a tab control with three pages, you could have 6 controls with a tab index of 1: one for each section and tab page. This means that any looping through controls by tab index has to be recursive. You must go by section, then any tab pages in that section. Of course, this complicates adding controls to a collection keyed by tab index. The straightforward way will work only for the simplest case: only a detail section with no tab pages. Otherwise, you will get duplicate tab indexes, and your item add won't work the way you expect. -Ken