General information
Category:
Forms & Form designer
Juan,
I had a similar problem because firing some methods withing a Valid or LostFocus method will cause the LostFocus and Valid to fire twice causing problems sometimes. I was able to solve my problem by putting only the code that caused the second Valid/LostFocus into the KeyPress Method and leaving the rest in the Valid. This worked in my case, it might not for you.
Ed
>Hello,
>
>I have problem with setting focus to another control after I am done with the current control. I issued "thisform.nextcontrol.setfocus()' from within 'thisform.currentcontrol.lostfocus()' method. It is observed that 'thisform.currentcontrol.lostfocus()' got executed again right after the 'thisform.nextcontrol.setfocus()' code. Can anyone tell me how to setfocus to another control, peacefully?
>
>I tried to code in keypress event, but the code triggered only if the is key press. I cannot issue setfocus from within valid() event.
>
>Man, there gotta be a better way to do this.
>
>Thanks,
>juan
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