News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Name:Alex Dybenko

Location:Moscow, Russia

Friday, November 02, 2007

One event procedure for several controls

I have got a question – how to make a common event procedure for several controls? This is not a problem for Click event, you just make a public function and set OnClick property to it as =MyFunction(). But this does not work for event procedure like Mouse Move, where you need to pass arguments there. John Mishefske, Access MVP, provided a solution where he made a class with class-level variable declared WithEvents, so event is execute in this class. The code in sample database explains for itself.


Post a Comment

<< Home