G
Guest
Hello:
I have a command button on FormA whose click event is coded as:
If foSearchForm Is Nothing Then
foSearchForm = New frmSearchInfo(Me)
End If
foSearchForm.Show()
where foSearchForm is a Private variable.
The first time the button is clicked, it correctly brings up the SearchForm.
If I change focus to FormA and click on the button again, it rightly brings
the SearchForm into focus.
But when I close the SearchForm and click on the button, I get the following
exception thrown:
Cannot access a disposed object named "frmSearchInfo".
What am I doing wrong?
Venkat
Cannot access a disposed object named "frmSearchInfo".
I have a command button on FormA whose click event is coded as:
If foSearchForm Is Nothing Then
foSearchForm = New frmSearchInfo(Me)
End If
foSearchForm.Show()
where foSearchForm is a Private variable.
The first time the button is clicked, it correctly brings up the SearchForm.
If I change focus to FormA and click on the button again, it rightly brings
the SearchForm into focus.
But when I close the SearchForm and click on the button, I get the following
exception thrown:
Cannot access a disposed object named "frmSearchInfo".
What am I doing wrong?
Venkat
Cannot access a disposed object named "frmSearchInfo".