Handling Multiple Events (1 Viewer)

Status
Not open for further replies.

ChrisO

Registered User.
Local time
Today, 12:59
Joined
Apr 30, 2003
Messages
3,202
Variations on a theme of multiple event handling.

In this case the event is the Mouse Down event of Textboxes. The mouse down event was chosen because it contains system arguments which might need to be handled.

There are nine(9) variations in the Access2003 attachment, not all of which handle the system arguments. Each of the variations contains twenty(20) textboxes.

The variations run from the obvious, but ridicules, copy/paste/modify technique through to the somewhat obscure technique where no code is actually required in the Form’s module. In this later case the Form’s ‘Has Module’ property must still be set to ‘Yes’ even though it contains no code.

The reason for Form’s Class module is that events are not generated for Form Controls without a Class module. Therefore those events can not be sent (sunk) to a stand alone Class module. If the stand alone Class module is not called then that Class module can not, in turn, pass on and sink the event.

If the Form has its ‘Has Module’ property set to ‘No’ then no compile or run time error is raised; it simply doesn’t work for events.

Tested with:-
Version..............: Access 2003 (Access 2000 file format).
Regional settings.: English, French, German and Portuguese.
References.........: None.
Error handling.....: None.

If you have any questions, please ask them in the appropriate forum.

Version 1
Original post.


Chris.
 

Attachments

Status
Not open for further replies.

Users who are viewing this thread

Back
Top Bottom