Running a module in Microsoft Access 2003

morinia
morinia used Ask the Experts™
on
Experts,

How do I run a  module from Access 2003?   Currently this is the only code in the Database. I want to see if it works.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
F5
moriniaAdvanced Analytics Analyst

Author

Commented:
Melih,

F5 and run prompt for the name of  a macro.
Nerd
Most Valuable Expert 2012
Top Expert 2013
Commented:
The above answer is not entirely complete,


You need to open the VBA Editor first, by either hitting Ctrl-G or opening the module from database window.

At that point, F5 will work (specify the name of the sub or function you want to run)

You can also hit ctrl-G again, which will take you to the "immediate window" at the bottom of the vba editor.  From there, you can run the sub or function by typing it its name and specifying pass parameters as needed.
Distinguished Expert 2017
Commented:
The technical answer is - you don't run modules - you run procedures.  You need to run the sub or function contained in the module.  If there are multiple, you need to figure out what is the "main" procedure that invokes the others.  If they are all independent, you would need to run each in turn.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial