>Thanks Larry,
>
>I was not sure if it respected Tab order. Exactly the information I was interested in learning.
>
>One day I'll learn to frame my questions more precisely.
>
>Have a wonderful day.
Unfortunately, I'm not. :-(
Objects does not respect Tab order. It respects instantiation order. In this case, the way you would go about ordering things would be to use Send to Back/Bring to Front. Since this takes a lot of effort on your part, you could store the TabIndex along with an object reference. Compare the stored TabIndex with the one of the currently failing control and if higher, store that as the object to use when you SetFocus.
local loSetFocus, lnTabIndex, lox
loSetFocus = .NULL.
lnTabIndex = 0
for each lox in MyContainer.Objects
if !ox.Validation() then
if isnull(loSetFocus) then
loSetFocus = lox
lnTabIndex = lox.TabIndex
else
if lox.TabIndex < lnTabIndex then
loSetFocus = lox
lnTabIndex = lox.TabIndex
endif
endif
endif
endfor
if !isnull(loSetFocus) then
loSetFocus.SetFocus()
endif
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao