>Hi Christopher ---
>
>Yup. There sure is. The following code will pop a WAIT WINDOW telling you where focus is headed (LostFocus code):
>
>** Control.LostFocus
>FOR i = 1 to THIS.Parent.ControlCount
> IF THIS.Parent.Controls(i).TabIndex = THIS.TabIndex + 1
> WAIT WINDOW "Next will be "+THIS.Parent.Controls(i).Name
> ENDIF
>ENDFOR
>
>Adapt as you see fit :-)
>
Obviously, this will only work if the tab key was pressed, and not Shift+tab, Left-arrow, or a mouse click.
If you are desparate though, you could use this in combination with the knowledge that when clicking from control to control, the next control's when event will fire before the previous control's lostfocus (this behavior is different when tabbing: both valid and lostfocus fire before the next control's when event). Using this, you could set up a scheme where every control sets a form property to its name inthe when event, then you could check this proprety in the of the control losing focus' lostfocus event.
Pretty kludgy though, if you ask me. Every time I thought I might need behavior like this, I figured out a better design that didn't require it.
Erik Moore
Clientelligence