Reacting to events in a member of a set of controls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • brucedodds@comcast.net

    Reacting to events in a member of a set of controls

    I would like a particular action to fire every time there's a
    mouseover event for any button on my (Access 2003) form. Does anyone
    know how to do this without writing an OnMouseOver event procedure for
    every button?

  • Tom van Stiphout

    #2
    Re: Reacting to events in a member of a set of controls

    On Thu, 30 Oct 2008 05:45:10 -0700 (PDT), brucedodds@comc ast.net
    wrote:

    That is the only way. Of course those individual procedures could call
    a central function to do something. Unlike .NET Access does not have
    bubbled events.

    -Tom.
    Microsoft Access MVP

    >I would like a particular action to fire every time there's a
    >mouseover event for any button on my (Access 2003) form. Does anyone
    >know how to do this without writing an OnMouseOver event procedure for
    >every button?

    Comment

    • brucedodds@comcast.net

      #3
      Re: Reacting to events in a member of a set of controls

      On Oct 30, 9:21 am, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
      On Thu, 30 Oct 2008 05:45:10 -0700 (PDT), brucedo...@comc ast.net
      wrote:
      >
      That is the only way. Of course those individual procedures could call
      a central function to do something. Unlike .NET Access does not have
      bubbled events.
      >
      -Tom.
      Microsoft Access MVP
      >
      >
      >
      I would like a particular action to fire every time there's a
      mouseover event for any button on my (Access 2003) form.   Does anyone
      know how to do this without writing an OnMouseOver event procedure for
      every button?- Hide quoted text -
      >
      - Show quoted text -
      Thanks.

      Comment

      • rkc

        #4
        Re: Reacting to events in a member of a set of controls

        On Oct 30, 9:51 am, brucedo...@comc ast.net wrote:
        On Oct 30, 9:21 am, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
        >
        >
        >
        On Thu, 30 Oct 2008 05:45:10 -0700 (PDT), brucedo...@comc ast.net
        wrote:
        >
        That is the only way. Of course those individual procedures could call
        a central function to do something. Unlike .NET Access does not have
        bubbled events.
        >
        -Tom.
        Microsoft Access MVP
        >
        >I would like a particular action to fire every time there's a
        >mouseover event for any button on my (Access 2003) form.   Does anyone
        >know how to do this without writing an OnMouseOver event procedure for
        >every button?- Hide quoted text -
        >
        - Show quoted text -
        >
        Thanks.
        You could write a class that encapsulates a button control and
        intercepts
        defined events, but it's hardly worth the effort for one event.

        Comment

        • Tom van Stiphout

          #5
          Re: Reacting to events in a member of a set of controls

          On Thu, 30 Oct 2008 13:46:17 -0700 (PDT), rkc <rkc@rkcny.comw rote:

          Interesting. Can you elaborate?
          Are you saying you can write a class and somehow (WithEvents?)
          associate it with an ordinary button? That sounds a lot like
          subclassing if we were doing straight SDK programming.
          Do you have a link?

          -Tom.

          >On Oct 30, 9:51 am, brucedo...@comc ast.net wrote:
          >On Oct 30, 9:21 am, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
          >>
          >>
          >>
          On Thu, 30 Oct 2008 05:45:10 -0700 (PDT), brucedo...@comc ast.net
          wrote:
          >>
          That is the only way. Of course those individual procedures could call
          a central function to do something. Unlike .NET Access does not have
          bubbled events.
          >>
          -Tom.
          Microsoft Access MVP
          >>
          >I would like a particular action to fire every time there's a
          >mouseover event for any button on my (Access 2003) form.   Does anyone
          >know how to do this without writing an OnMouseOver event procedure for
          >every button?- Hide quoted text -
          >>
          - Show quoted text -
          >>
          >Thanks.
          >
          >You could write a class that encapsulates a button control and
          >intercepts
          >defined events, but it's hardly worth the effort for one event.

          Comment

          • rkc

            #6
            Re: Reacting to events in a member of a set of controls

            On Oct 31, 12:54 am, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
            On Thu, 30 Oct 2008 13:46:17 -0700 (PDT), rkc <r...@rkcny.com wrote:
            >
            Interesting. Can you elaborate?
            Are you saying you can write a class and somehow (WithEvents?)
            associate it with an ordinary button? That sounds a lot like
            subclassing if we were doing straight SDK programming.
            Do you have a link?
            >
            -Tom.
            >
            On Oct 30, 9:51 am, brucedo...@comc ast.net wrote:
            On Oct 30, 9:21 am, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
            >
            On Thu, 30 Oct 2008 05:45:10 -0700 (PDT), brucedo...@comc ast.net
            wrote:
            >
            That is the only way. Of course those individual procedures could call
            a central function to do something. Unlike .NET Access does not have
            bubbled events.
            >
            -Tom.
            Microsoft Access MVP
            >
            >I would like a particular action to fire every time there's a
            >mouseover event for any button on my (Access 2003) form.   Does anyone
            >know how to do this without writing an OnMouseOver event procedure for
            >every button?- Hide quoted text -
            >
            - Show quoted text -
            >
            Thanks.
            >
            You could write a class that encapsulates a button control and
            intercepts
            defined events, but it's hardly worth the effort for one event.
            The Master of the out of ordinary does it here with a form. It would
            be ridiculous
            for me to post anything I have when you can look at what he did.


            Comment

            Working...