views:

194

answers:

1

Is there a way to determine the Object type, when passing a reference to a function?

I'm using a security permissions function, which determines if the user has permission to view/edit the Form passed to it by reference. I'd like to expand this to include reports as well.

To keep the function generic, I'd like to pass a ref for either a Form or a Report as an Object, eg: function gfSecurity_Permission(obj as Object)

However, I'd need to determine the type of the object within the function.

Does anyone know of a way to do that?

MTIA

+4  A: 

Take a look at

typeOf and typeName

Gaby
Thanks very much!
maxhugen