>>>I use the up & downarrow keys to toggle through records. With FPW I could use the
>>>_CUROBJ=OBJNUM(FieldName) to return the cursor to the current field. I know with
>>>VFP5 I should use the ActiveControl property but I'm not sure how it's used. I'm
>>>inserting the code in the keypress method.
>>>
>>>TIA
>>>
>>>Chris
>>
>>If you gonna do something with other objects and then return to curobj set a form property to hold the reference - say oCurObject :
>>
>>*
>>* Keypress event
>>thisform.oCurObject = this && Save the reference
>>...
>>thisform.oCurObject.setfocus()
>
>I have 3 text boxes on the form (Text1, Text2, Text3)
>
>I tried this in the keypress event for Text2
>
>IF nKeyCode=24
> SKIP 1
> IF EOF()
> GO BOTTOM
> ENDIF
> This.Text2.SetFocus
>ENDIF
>
>It jumps to the next field (Text3 - tabindex 3) but
>if I use this in keypress event
>
>IF nKeyCode=24
> SKIP 1
> IF EOF()
> GO BOTTOM
> ENDIF
> This.Text1.SetFocus
>ENDIF
>
>It returns the cursor to Text2. Is there a way I could say return cursor
>to TabIndex-1 or am I just missing something?
nKeyCode= 24 DnArrow ? Well doesn't matter.
Just add a "nodefault" after if ..