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 <--
 
Back
Top