General information
Category:
Forms & Form designer
Environment versions
Network:
Windows 2003 Server
Are you sure you aren't confusing 'lostfocus' with 'valid'? But afaik, that still isn't supported.
>I don't recall what version support was added for this, but eariler versions didn't support setfocus in lost focus.
>
>
>>>>I would recommend you use the lostfocus to do that. You can use something like:
>>>>
>>>>this.parent.txtdatebeg.setfocus()
>>>>
>>>>assuming the beginning date textbox sits on the form directly and is named txtdatebeg
>>>>
>>>>if you want to move focus back to that control from another control. You can check in the lostfocus of each control if beginning date is empty and ending date is not or vice versa and display your message and set focus where you need it using the control's setfocus(). You just cannot set focus from a valid. Is it a date or datetime field?
>>>>
>>>
>>>If you return number that corresponds the control's TabSequence from the valid event (difference between current control and that one), you'll set focus on it.
>>
>>I know that, but I associate that with the older foxbase means of setting focus. If the sequence of controls ever changes, returning the number sets focus to a different control.
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