>>>I have this FPW2.6 form that had data entry boxes(textbox). If the user pressed F2 a list box would popup showing a selection which if selected would fill the value in the textbox and "Jump" to the next textbox. The code in the LISTBOX valid aften filling the field was:
>>>
>>>IF NOT EMPTY(txtdata1)
>>> _CUROBJ = OBJNUM(m.txtdata1)+1
>>> SHOW GETS
>>>ENDIF
>>>
>>>This caused the focus to move to the NEXT text box in TAB order.
>>>
>>>I need to do something similar in VFP5 except the help is of no help.
>>>_CUROBJ is not supported.
>>>
>>>How can I do this in vfp5. I need to make the focus move to the next txtbox in tab order from a form method. I can achieve this using KEYBOARD{DNARROW} but would prefer a better method.
>>>
>>>The form Method need not know the next textbox object name (like above in FPW26 OBJNUM(m.currentfield)+1).
>>>
>>>Thanks
>>
>>Use Control.SetFocus
>
>
>I know aboutthe SETFOCUS Method. As mentioned above, I do not know WHAT "Control" is.
>
>In the FPW2.6 code I did not care as I used _CUROBJ = OBJNUM(currentfield)+1
>This set the focus to the NEXT tab order field without the need of knowing what its name or variable was.
>
>THIS IS WHAT I NEED TO DO!!
>
>Bernard
You have Form.ActiveControl property, Form.Controls() collection and Control.TabIndex property. And don't shout, please.
Edward Pikman
Independent Consultant