has parent

M

mcnews

how can i tell if a form has a parent or not.
i use a form as a subform and as a dialog that opens form a button
click.
i don't need to be told how to design my form.
i need to know how to find out if the form has a parent or not.
isnull(me.parent) doesn't do it.

thanks,
mcnewxp
 
D

Douglas J. Steele

You can refer to its Parent property and trap the error 2452 that'll be
raised if it isn't being used as a subform.
 
M

mcnews

You can refer to its Parent property and trap the error 2452 that'll be
raised if it isn't being used as a subform.

that's it, huh.
that's what i did, but thought might be something a little more
elegant.
thanks.
 
Top