Link to home
Start Free TrialLog in
Avatar of JJINFM
JJINFM

asked on

Calling Access Event Procedures

Hi Experts.

I have a form in Access that has about 2 dozen command buttons that each have an event procedure to run when clicked.  I would like to add one more button that would run the all the event procedures from all the buttons.  Is there a way to call these other 'on click' button events from the new button?

Thanks in advance.

JJ
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You had better make sure you have some iron-clad error handling and/or rollback functionality in place...
In case one of the subs fails...
<You had better make sure you have some iron-clad error handling and/or rollback functionality in place...
In case one of the subs fails...
 >

True dat!

Even if your individual buttons have error handling, one of them failing may not bomb your mega-call, and if there are dependencies between these actions that could be bad
Copying and pasting the code from each button into a new procedure, with error handling might be prudent.
Building one big procedure that the 20 buttons call, passing in a parameter, that has a Select Case structure to deal with the piecemeal or mega-press might also be good.

But yes, they can all be called together like the first two posters have written
Also some back ground would be nice...

<I have a form in Access that has about 2 dozen command buttons>
24 button on one form?

Why the need to do this?
What are these codes doing?

Just curious...
...in case there is a more efficient approach...
Avatar of JJINFM
JJINFM

ASKER

Thank you both.