Error messages cause program not to work
Posted on 2006-05-06
I have used the data connection wizard to connect VB.NET to my Access database - the result is a success. However when I try to add error messages like this:
If editCType.Text = "" Then
MsgBox("Contact type cannot be blank", MsgBoxStyle.Information, "Error")
the program no longer works because a second error message appears - that I did not create and this causes the program to stop.
There is already some code in the program which appears to be designed to catch errors but I don't know how to use it correctly - it looks like this:
'Attempt to load the dataset.
Catch eLoad As System.Exception
'Add your error handling code here.
'Display error message, if any.