Simulating An Event

sudo

New member
Local time
Today, 05:45
Joined
Nov 12, 2003
Messages
7
simulate a click event

In my Access application, I have a form that displays a list of records by an ID number. The "On Click" property points to a macro that runs when the user clicks on one of the record IDs. However, there are times when I want to automatically do the "click" so the user doesn't have to. Is there a way to simulate a click event so that the form thinks the user has clicked a particular ID, thus launching the macro?

Thanks
 
I have done this in the past by doing the following...

Save the Code that you want to run as a public sub in Modules. Then create a Public function in modules that calls this Sub...I then created Macro that simply uses RunCode command and named the public function...This Macro can then be used in any other code you are running that requires this.

You probably can run the public function directly without using the Macro..I just got lazy and this worked....

Hope this helps
 

Users who are viewing this thread

Back
Top Bottom