T
The Mad Ape
Hi
Whenever I open a form and want to check for an existence of the form
I use the following code:
Dim frm As Form
For Each frm In Me.MdiParent.MdiChildren
If TypeOf frm Is Form17 Then
frm.Close()
End If
Next
However when this same code is placed in a module it does not work as
'Me' throws an error:
Me is not valid withing a module.
How do I overcome this?
Thanks in advance.
Whenever I open a form and want to check for an existence of the form
I use the following code:
Dim frm As Form
For Each frm In Me.MdiParent.MdiChildren
If TypeOf frm Is Form17 Then
frm.Close()
End If
Next
However when this same code is placed in a module it does not work as
'Me' throws an error:
Me is not valid withing a module.
How do I overcome this?
Thanks in advance.