How do i substitue Me in a global code ?
I want to substitue the Me in the following code so that i can open it from any form.
My function should work with any form having a control called ProductChoice
but i do not know how could i replace the Me.
The function is the following
Public Function dummy(ProductChoice)
Dim strDocName As String
strDocName = “FProducts”
If IsOpen(strDocName) = True Then
Select Case ProductChoice
Case 1
Me.FilterOn = False
Case 2
Me.FilterOn = True
Me.Filter = “supplierid = 1”
Case 3
Me.FilterOn = True
Me.Filter = “supplierid = 2”
End Select
End If
End Function
I will be grateful for any advice