function

  • Thread starter Thread starter Ann
  • Start date Start date
A

Ann

I use issubform(me)to check if the form is a sub form or
not, but gives error message: function or sub not defined.

Any ideas?

Thanks
 
Ann said:
I use issubform(me)to check if the form is a sub form or
not, but gives error message: function or sub not defined.


What is the code in that function?

If you don't have such a function then you'll have to create
one. Here's a simplistic version of such a function:

Function IsSubform(frm As Form)
On Error Resume Next
IsSubform = frm.Parent.Name
IsSubform = (Err.Number = 0)
End Function
 
Thank you. You are right I don't have this function
written. Your code is very helpful.

Xiaowei
 
Back
Top