General information
Category:
Coding, syntax & commands
Title:
Calling SetFocus from within a Valid
In the Keypress event of my form, I allow the user to press F3 to open a new additional (different) form.
If the user presses F3 when the focus is on a textbox that has code in it’s valid event (even if the code is just a WAIT WINDOW), and if the form that is called calls the SetFocus() method of one of it’s controls (very common in the init’s of most of my forms) then I get the error message:
"Cannot call SetFocus from within a When, Valid, RangeHigh, or RangeLow Event."
I could solve my problem by getting rid of either my Valid or my SetFocus, but because I want them both, I’m looking for a different approach.
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