>Try the following
>
>lnNextControl = THIS.TabIndex+1
>IF THISFORM.ControlCount > lnNextControl
> THISFORM.CONTROLS(lnNextControl).SETFOCUS
>ENDIF
Russel
I was right last time. Tabindex is different from Controls(). Tab index you have control over, CONTROLS() is fixed to the order the objects have been added to the form.
So If Field1.tabindex is 1, Field2.tabindex = 2 but you had already inserted say 2 command buttons with tab index of 3 & 4,
For field1 the tabindex is 1 but the Form.Controls() index is 3. Hence the above method WILL not work without a major re arrangement of the screen and defnitely cannot be used in a class to drop on a form.
Your thoughts on this??
Bernard