Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Question Unanswered: Knowing the name of a subforms parent

    I have a subform I use in several forms.
    Now when I click the subform I want to retrieve the name of the form in which the subform is included.
    How can I do this?

    Or any other way to identify the form is also welcome.

    Thanks
    Last edited by artemide; 03-28-03 at 05:40.

  2. #2
    Join Date
    Mar 2003
    Location
    London
    Posts
    40

    Re: Knowing the name of a subforms parent

    You can use the 'Parent' property of any form's control, i.e.
    if your form is named Form1, and subform you use on this form is named SubForm1, then you can use this in VBA code:
    Me.Subform1.parent.name to retrieve 'Form1'

  3. #3
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Re: Knowing the name of a subforms parent

    Originally posted by yk58301
    You can use the 'Parent' property of any form's control, i.e.
    if your form is named Form1, and subform you use on this form is named SubForm1, then you can use this in VBA code:
    Me.Subform1.parent.name to retrieve 'Form1'

    Thanks I should have known this.

Posting Permissions

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