Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Keypress event vs. Valid Event
I have several textboxes that I am using within a form that is being used for data entry.
I am using the the textboxt Valid Event to run a query (if the textbox is not empty) based on the value entered in that textbox. The code is basically as follows:
IF NOT EMPTY( This.value)
rc_custno = ALLTRIM( This.Value)
ThisForm.m_query()
ELSE
WAIT WINDOW "Customer # must be entered"
ENDIF
However, if I don't enter a value and decide to exit the form by using a command button set up for thisform.release(), it still runs teh valid event (ofcourse) and gives me the WAIT WINDOW message.
Ideally I would want this code to fire only when I press TAB or ENTER, and I know that I should be using the KEYPRESS event or sort of it, but I can't get the syntax correct. help.
Thanks,
Alex
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