SBendBuckeye
Programmer
I have a function which takes in an object parm and sets a reference to a form. I made the parm variant so I could handle either a string form name or a form object. I want to use something like the following:
Private mfrm As Form 'Module level declaration
If IsObject(Parm As Variant) Then
If Parm Object is a form Then
Set mfrm = Parm
Else
Report error since incorrect object type
End If
Else
Set reference to form using string form name
In VBA this would be the following:
Set frm = Forms(Parm) 'Add to open forms collection
End If
How do I determine if the object is a form for an object parm and how do I set the reference of a string parm. I want to put the above code in a DLL and call it from an Access97 application.
Any help would be greatly appreciated!
Have a great day!
Private mfrm As Form 'Module level declaration
If IsObject(Parm As Variant) Then
If Parm Object is a form Then
Set mfrm = Parm
Else
Report error since incorrect object type
End If
Else
Set reference to form using string form name
In VBA this would be the following:
Set frm = Forms(Parm) 'Add to open forms collection
End If
How do I determine if the object is a form for an object parm and how do I set the reference of a string parm. I want to put the above code in a DLL and call it from an Access97 application.
Any help would be greatly appreciated!
Have a great day!