Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keypress event vs. Valid Event
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Keypress event vs. Valid Event
Divers
Thread ID:
00396603
Message ID:
00396603
Vues:
39
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
Fil
Voir

Click here to load this message in the networking platform