Errorprovider validating

I also want the error to display on just the one that is blank. I created the validation sub because I want to check the fields even if the user never accesses them, I originally was going through each textbox using the _Leave or _Text Changed but if the user never actually hits that textbox it never fired? Cancel=True means that the event should be cancelled.

I have three groupboxes on my form, how do I loop through those groupboxes to make sure all textboxes are checked? What is happening is eventhough the two required fields are not filled in I get the "I can continue", which I'm assuming is because I'm missing something in my innermost IF statement for Group Box 2, or I should be setting something in the two validating events.

But in Case of C# windows application this feature is not available so we use Error Provider control to do any type of validation.

I've created a validation sub to make sure each text box has an entry.

Check Text Boxes(Group Box3) it continues through the rest of the Button_Click events when I want it to stop and require the user to enter the values then click the button again.

Can I put the Check Text Boxes() within an If Statement?

Leave a Reply