G
Guest
I have a login screen. I enter the login info and go io the second form of my app
I push the exit button(the red X) and I'm returned to the login screen
I again enter the login info and go back to the second form of my app
I push the exit button(the red X) and that's when I get the 'Object reference not set to an instance of an object' error
I stepped throught the code and it hits the exact same code as the first go around
Why does it fails the second time around and not the first
It was working fine for one or two days and now this
Help please
Here is a little piece of code
Private Sub frmOars_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closin
Dim result As Microsoft.VisualBasic.MsgBoxResul
Dim frm1 As New frmLogi
result = MsgBox("Do you want to Quit?", MsgBoxStyle.YesNo Or MsgBoxStyle.Critical, "Quit"
If result = MsgBoxResult.Yes The
'clear memory - should be moved to the destructo
SelTeacherDataset.Dispose(
SelGradeDataset.Dispose(
SelThemeDataset.Dispose(
SelSchoolDataset.Dispose(
frm1.Show(
Me.Hide(
ElseIf result = MsgBoxResult.No The
e.Cancel = Tru
End I
End Sub
I push the exit button(the red X) and I'm returned to the login screen
I again enter the login info and go back to the second form of my app
I push the exit button(the red X) and that's when I get the 'Object reference not set to an instance of an object' error
I stepped throught the code and it hits the exact same code as the first go around
Why does it fails the second time around and not the first
It was working fine for one or two days and now this
Help please
Here is a little piece of code
Private Sub frmOars_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closin
Dim result As Microsoft.VisualBasic.MsgBoxResul
Dim frm1 As New frmLogi
result = MsgBox("Do you want to Quit?", MsgBoxStyle.YesNo Or MsgBoxStyle.Critical, "Quit"
If result = MsgBoxResult.Yes The
'clear memory - should be moved to the destructo
SelTeacherDataset.Dispose(
SelGradeDataset.Dispose(
SelThemeDataset.Dispose(
SelSchoolDataset.Dispose(
frm1.Show(
Me.Hide(
ElseIf result = MsgBoxResult.No The
e.Cancel = Tru
End I
End Sub