General information
Category:
Coding, syntax & commands
Beware of traps using the Valid event. If the user's cursor is in the input box (textbox, combo, etc.) and then they try to "Cancel" the input form via a mouse click to a Cancel commandbutton, they can't. The valid event of the input box will fire and if it is empty, they will not be able to "Cancel" until something is entered.
You will need to provide a means to cancel using the commandbutton and by-pass the valid event. One way to do this is to set a custom property in the input box, CheckValid and set it to true when the input box is entered. In the commandbutton for cancel, in the mouseenter event set the CheckValid property to false; in the mouseleave event set it back to true. Then in the valid event have an IF statement to check for CheckValid is true before performing the EMPTY check.
Previous
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