Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2002

    Unanswered: Determine if a form is a sub-form or not

    I have a form that can be used either by itself or as a sub-form. I'd like it to determine whether it's been opened as a child and fill out some values.

    I've tried doing a check during the child's OnLoad event to determine if the Parent property is null, figuring that if its not a sub-form it would be Null. Well, if I try that it comes back with an error.

  2. #2
    Join Date
    Aug 2003
    I'm not sure this is the best solution, but you could check if the parent is open.

    If CurrentProject.AllForms("ParentForm").IsLoaded Then
    ...Code for whatever you will accomplish here
    End If


    /Svein Erik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts