I have this code :
When I call the function without any parameter I receive an error on following lines because frm is empty.
How can I check if frm has been passed to the function or not.
IsMissing always returns false, because frm is an object and not a variant.
I've also tried IsEmpty & IsNull. They also always return False.
How can I check if a form has been passed to the function or not?
I can change the data type of frm to string and check if frm="" or not. But for now I prefer to pass a form and not its name.
Thank you.
SQL:
Public Function CreateFilter(Optional frm As Access.Form) As String
If IsMissing(frm) Then
Set frm = Screen.ActiveForm
End If
End Function
When I call the function without any parameter I receive an error on following lines because frm is empty.
How can I check if frm has been passed to the function or not.
IsMissing always returns false, because frm is an object and not a variant.
I've also tried IsEmpty & IsNull. They also always return False.
How can I check if a form has been passed to the function or not?
I can change the data type of frm to string and check if frm="" or not. But for now I prefer to pass a form and not its name.
Thank you.