• Call procedure in parent form (Acc 97 SR2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Call procedure in parent form (Acc 97 SR2)

    Author
    Topic
    #359502

    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

    Viewing 0 reply threads
    Author
    Replies
    • #538992

      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.

    Viewing 0 reply threads
    Reply To: Call procedure in parent form (Acc 97 SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: