Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing to field with tabindex = 1
Message
From
26/11/2001 03:03:55
 
 
To
26/11/2001 01:48:30
Zoran Rajovic (Online)
Ed Pancevo
Pancevo, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00585631
Message ID:
00585633
Views:
19
>Is there a way to when I add new record, cursor be positioned at a first field on form (field which have tabindex 1)? I don't want referencing by field name.

You'd have to spin through all the controls in the form's Controls collection looking for a control that has TabIndex=1.
LOCAL oCtrl
FOR EACH oCtrl IN thisform.Controls
  IF PEMSTATUS(oCtrl,"TabIndex",5) AND oCtrl.TabIndex=1
    oCtrl.SetFocus()
    EXIT
  ENDIF
ENDFOR
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform