VB6: Exit out of a text box's Validation - TechRepublic
General discussion
May 30, 2000 at 07:43 AM
vdanner

VB6: Exit out of a text box’s Validation

by vdanner . Updated 26 years ago

If a user has clicked on the New button, he will be taken to a data entry form. Most of the text boxes have simple validation’s in their respective Validation events, such as to make sure they have entered something in required fields. I want the user to be able to, at any time during entering a new record, to change their mind about entering a new record and hit the Cancel button, thereby clearing the form. But I can’t get the validation to end if they hit the Cancel button, even if I set CausesValidation = False in the cmdCancel_Click event. It is stuck in the Validation event and won’t move on to cmdCancel_Click unless the user enters some dummy data first.

This discussion is locked

All Comments