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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Errorprovider and data validation

Status
Not open for further replies.

RexAdventure

Programmer
Jan 21, 2002
2
AU
Hi Guys,

I have a form that contains three text boxes, two buttons and an error provider. The first button takes the data from the form and shuffles it off to SQL server vis a stored procedure. The second button cancels (and closes) the form if the user decides that they don't want to add to the database. I have an error provider on the form that used in conjunction with the validating and validated events of the text boxes (usual data validation: text exists, is in certain format, etc.).

My problem is this: If the user clicks the cancel button to close the form, the error provider pops up on the text boxes after validating that the text box is empty. I just want the cancel button to quit the form cold.

Any help would be appreciated.

Rex.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top