Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validating data in a form control

Status
Not open for further replies.

bytehead

Programmer
Jul 12, 2001
25
US
I have a MaskEdBox control on a form and am using the Validate Event to make sure invalid charachters are not placed in the MaskEdBox control. I have set the MaskEdBox control up as follows, >AA##-####.

I have set the default display charachter to "#" so I am validating whether or not the "#" exists in the value before passing control to any other object on the form.

Unfortunatley, during this whole process I would like to have a Command button active on the form at all times, an exit button if you will. But the validate event is not letting be access this command button.

Any suggestions on how I can still do the validate but always have the Command button active and nothing else on the form active?
 
What you need to do is set the 'CausesValidation' property of the exit button to false. Then it won't raise the validate event.

Buffer0verflow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top