Tabcontrol in Viusal Studio 2013 using Visual Basic

We need to add a tabcontrol to some of our forms.  Each tab will have a grid on it.  When the user clicks a new tab, I need to validate all the data on the tab they were on.  If during the validation I find any bad data then i don't want to display the recently clicked tab but instead want to stay on the tab with errors and show a message box.  Is there a proper way i should be doing this?  I will need to do this on every tab when they click another tab.
LVL 1
pmac38CDSAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pmac38CDSAuthor Commented:
After looking around some more, should I just be using the deselecting event?  It looks like I can decide which tab I am on, and do the validation for that tab and then e.cancel=true if needed, or show the next tab.
it_saigeDeveloperCommented:
That is correct.  You want to use the Deselecting Event and perform your validation.  If you find that the data is not valid, then you cancel the tab change.

This previous EE_PAQ discusses just that process: http:/Q_23411323.html

-saige-

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pmac38CDSAuthor Commented:
Thanks for the help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.