General information
Category:
Coding, syntax & commands
Cetin, tanks for yoyr reply which I'll experiment with .
Does issuing a NoDefault() in GotFocus skip the Valid etc of that control and go to the next control
>>Hi.
>>I have a bunch of code in an old FPW app which I am trying to emulate in VFP
>>
>>Code goes as follows:
>>When Event:
>>Cmd1
>>Cmd2
>>cmd3
>>If MyTest1 = .F.
>> _Curobj=ObjNUm(MyNextField)
>>Endif
>>If Mytest2 = .F.
>> Return
>>Endif
>>
>>This works fine in FPW and the current control does not get focus if either Mytest1 or Mytest2 is false.
>>
>>If I try this in VFP When event (replacing _Curobj with a Set Focus,I get an error because this command is not allowed in the When event
>>
>>If I move the code to the GotFocus,the Return .f. does not leave the control
>>
>>Is there any way of leaving the above code in one of the controls(either GotFocus or When I guess) and getting the same result as a When in FPW.
>>
>>Regards,
>>
>>Gerard
>
>Gotfocus Event:
>Cmd1
>Cmd2
>cmd3
>If !MyTest1
> nodefault
> MyNextField.SetFocus()
>Endif
>If !Mytest2
> Return && ???
>Endif
>
>Cetin
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only