Results 1 to 3 of 3

Thread: Public sub (97)

  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Public sub (97)

    Quick Q...

    can i run a public sub on a subform from the parent? How do i reference it?

    i have a dblclick event on the subform, but i also want to run this code from a button on the parent form.
    Thanks,

    pmatz

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Public sub (97)

    Dim intCancel As Integer
    Me.subformname.Form.Form_dblClick intCancel

    where subformname is the name that the subform has as a control on the main form; this is not necessarily the same as the name of the subform in the database window.

    This requires that you changed the On Dbl Click event procedure from Private to Public.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Public sub (97)

    thanks Hans! <img src=/S/cloud9.gif border=0 alt=cloud9 width=25 height=23>
    Thanks,

    pmatz

Posting Permissions

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