Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement