Hi All
Can anybody try this form and tell me why, when i enter a number greater than 100 and press the enter key the focus go to Text3 instead to Text2 ?????
Help please !!!
**************************************************
*-- Form: form1 (c:\aplicaciones\aguas cordobesas\form1.scx)
*-- ParentClass: form
*-- BaseClass: form
*
DEFINE CLASS form1 AS form
Top = 0
Left = 0
Height = 213
Width = 267
DoCreate = .T.
Caption = "Form1"
Name = "Form1"
ADD OBJECT text1 AS textbox WITH ;
Alignment = 3, ;
Value = 0, ;
Height = 23, ;
Left = 51, ;
TabIndex = 1, ;
Top = 24, ;
Width = 70, ;
Name = "Text1"
ADD OBJECT lbluf AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Field3", ;
Left = 11, ;
Top = 58, ;
TabIndex = 5, ;
Name = "lblUf"
ADD OBJECT lblnrocajabc AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Field4", ;
Left = 11, ;
Top = 94, ;
TabIndex = 7, ;
Name = "lblNrocajabc"
ADD OBJECT combo1 AS combobox WITH ;
Height = 25, ;
Left = 133, ;
TabIndex = 2, ;
Top = 24, ;
Width = 121, ;
Name = "Combo1"
ADD OBJECT label1 AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Field1", ;
Left = 11, ;
Top = 27, ;
TabIndex = 6, ;
Name = "Label1"
ADD OBJECT text2 AS textbox WITH ;
Height = 23, ;
Left = 51, ;
TabIndex = 3, ;
Top = 56, ;
Width = 70, ;
Name = "Text2"
ADD OBJECT text3 AS textbox WITH ;
Height = 23, ;
Left = 51, ;
TabIndex = 4, ;
Top = 93, ;
Width = 70, ;
Name = "Text3"
ADD OBJECT cmdcancel AS commandbutton WITH ;
Top = 160, ;
Left = 91, ;
Height = 27, ;
Width = 84, ;
Caption = "\
TabIndex = 8, ;
Name = "cmdCancel"
PROCEDURE text1.KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
If nKeyCode = 13
If This.Value > 100
ThisForm.Text2.SetFocus()
EndIf
EndIf
ENDPROC
PROCEDURE cmdcancel.Click
ThisForm.Release
ENDPROC
ENDDEFINE
*
*-- EndDefine: form1
**************************************************
TIA