General information
Category:
Coding, syntax & commands
It works as lostfocus IS expectED to work, I think. If you just want to go to field2 after field1, you can use Valid return code:
*from VFP Help:
*The Valid event can also return a numeric value.
*Returning a numeric value has one of three effects:
*If 0 is returned, the control does not lose focus.
*If a positive value is returned, the value specifies the number of controls *the focus advances. For example, if the Valid event returns 1, the next *control gets the focus.
*If a negative value is returned, the value specifies the number of controls *the focus moves back. For example, if the Valid event returns –1, the previous control gets the focus
Hope this help
>>>>>>>>>>>>>>>>>your message below
I have coded some setfocus() commands in a field's lostfocus. This seems to have an unexpected result in VFP6 service pack 4. The execution follows this path:
Field1.Valid start
Field1.Valid return
Field1.LostFocus start
execute field2.setfocus() in the lostfocus
Field2.when fires (as expected)
Field2.when returns
Field1.Valid fires (WHAT?)
Field1.Valid returns
Field2.Gotfocus fires
Field2.Gotfocus returns
Field2.when fires (what? when again AFTER gotfocus?)
Field2.when returns
Field1.LostFocus returns
We are now in Filed2 waiting for input.
Has anyone seen this before?
Weldon Adair
Previous
Next
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