Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Call procedure in parent form (Acc 97 SR2)

    What is the syntax for calling a procedure from a different form? I have a subform, and I want the double-click event of a textbox to run a procedure in its parent form.

    Private Sub SelectedDate_DblClick(Cancel As Integer)
    Me.Parent!FirstDate = SelectedDate
    ' Forms!frmToggleCalendar.FillDates
    End Sub

    When this code is executed (minus the comment), it generates run-time error 2465. Also tried with Me.Parent syntax, but with same result.

    TIA
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Call procedure in parent form (Acc 97 SR2)

    I assume FillDates is the name of a Procedure? Make sure it was defined as Public. Other than that, the error is in the procedure itself.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Call procedure in parent form (Acc 97 SR2)

    Thanks -- I had forgotten to change Private to Public!
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

Posting Permissions

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