Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress event vs. Valid Event
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Keypress event vs. Valid Event
Miscellaneous
Thread ID:
00396603
Message ID:
00396603
Views:
41
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
Next
Reply
Map
View

Click here to load this message in the networking platform