Use a form object passed as a parameter
OK, I got it, but I still can't seem to close the
form that way. My code
Public Sub HandleErrors(Optional ByVal pobjSourceForm As Form)
If pobjSourceForm Is Nothing
Exit Sub
Else
pobjSourceForm.Hide ' unload doesn't work either
End If
End Sub
doesn't close the form passed to the function, even
though the form name is being passed properly. Can I
do this somehow?
Thanks for the help, guys.
Quote:
> In a global-level error handling sub, I have passed the name the
> form that created the error, like this:
> Public Sub HandleErrors (Optional ByVal pobjSourceForm As Form)
> I can't seem to use the object in my code module. For instance, I need
> to determine whether is was passed as a parameter, using something like
> If pobjSourceForm = Nothing Then
> or something similar, and I'd like to close the form from my module
> with something like
> Unload pobjSourceForm or
> pobjSourceForm.Hide
> but neither of these work.
> Can I do what I'm trying to do? If so, any help with the code structure
> would be appreciated.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----