Hi!
Just change the "this.setfocus()" to "nodefault" in the lostfocus of the control
Sarosh
procedure lostfocus
if empty(this.value)
messagebox('Invalid')
*this.setfocus()
nodefault
endif
>>Hi!
>>
>>Don't use the Valid Event use LostFocus instead and then if you want to stay in that same control maybe your validation routine returns false then just setfocus back to the same control [This.SetFocus()]
>>
>>Sarosh
>
>If I put two textboxes on a form. One with...
>procedure lostfocus
>if empty(this.value)
> messagebox('Invalid')
> this.setfocus()
>endif
>
>and the other with
>procedure gotfocus
>messagebox('Got me')
>
>You will see that on tabbing out of box 1 you still get both messages and box 2 gets the focus anyway!
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