how to stop a method when recieving an error?
-
here is what i have and what is happening. I have a main form then another form opens when user clicks the add button. on this form when you add the new information an error check is suppose to run. my problem is i need the error check to stop running and leave the focus on the 2nd form to show where the error is. instead it wants to go back to the main form and finish executing the code that was started when the 2nd form opened! any suggestions thanks
-
here is what i have and what is happening. I have a main form then another form opens when user clicks the add button. on this form when you add the new information an error check is suppose to run. my problem is i need the error check to stop running and leave the focus on the 2nd form to show where the error is. instead it wants to go back to the main form and finish executing the code that was started when the 2nd form opened! any suggestions thanks
-
try using a try/catch block on the code in question I'm not an expert yet, but I play one at work. Yeah and here too.
-
that is not quite what i am looking to do. i believe a try catch is for debugging your own code sort of.....i need am trying to throw messages to the user if there input is wrong. thanks for the help though
well its about validation just because you use a try catch doesnt mean you do or dont have to throw a message. Obciously if there is an error you need to catch it and determine what is wrong and how to resolve the issue I'm not an expert yet, but I play one at work. Yeah and here too.
-
here is what i have and what is happening. I have a main form then another form opens when user clicks the add button. on this form when you add the new information an error check is suppose to run. my problem is i need the error check to stop running and leave the focus on the 2nd form to show where the error is. instead it wants to go back to the main form and finish executing the code that was started when the 2nd form opened! any suggestions thanks
-
here is what i have and what is happening. I have a main form then another form opens when user clicks the add button. on this form when you add the new information an error check is suppose to run. my problem is i need the error check to stop running and leave the focus on the 2nd form to show where the error is. instead it wants to go back to the main form and finish executing the code that was started when the 2nd form opened! any suggestions thanks
If you could post some code it might help - monrobot13
-
If you could post some code it might help - monrobot13