General information
Category:
Forms & Form designer
Title:
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
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