run macro on click access

The new button appears on the Quick Access Toolbar, where you can click it to run the macro.
Under Customize the Ribbon, in the Main Tabs list, check the Developer box if it is not already checked.
Action cell, select the action that you want to perform.Select the macro you want to add to your new group, and then click Add.Note: To bypass the AutoExec macro and other startup options, hold down the shift key while you start the database.The new macro will run the next time that you open the database.It's a trivial example as you likely would not need a VBA function for that purpose, but the point is that this is how you call functions from within a SQL statement.Under Symbol, select a button icon for your macro.You're not running a module - you're running subroutines/functions that happen to be stored in modules.This means that you can call them with RunCode in a macro, from the class modules of forms/reports, from standalone class modules, or for the functions, from SQL (with some caveats).Decide whether to trust a database pc mighty max 2013 or, how database objects behave when trusted and untrusted.For example, pick Home, to add your group to the Home tab.A possible work around would be to convert all macros to VBA.
To replace the rather cryptic macro icon with a different button for your macro, click.