a form that open's either as a form or as a subform

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

i have a form that can apear either as a form or as a subform
how can i determine on the onload event if it is a form or a subform?

thanks
 
hi Sam,
i have a form that can apear either as a form or as a subform
how can i determine on the onload event if it is a form or a subform?

Public Function IsSubform(AForm As Access.Form) As Boolean

On Local Error GoTo LocalError

IsSubform = (AForm.Parent.Name <> "")

Exit Function

LocalError:
IsSubform = False

End Function


mfG
--> stefan <--
 

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

Back
Top