function

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
 
M

Marshall Barton

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
 
A

Ann

Thank you. You are right I don't have this function
written. Your code is very helpful.

Xiaowei
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top