Link to home
Start Free TrialLog in
Avatar of hellblazeruk
hellblazeruk

asked on

Macro to run a module from Microsoft Access

I have been searching but can’t find how to do this, how do I run a module from a macro in Access?
Avatar of Norie
Norie

First thing is that you can't 'run' a module.

You can run code that's in a module.

Is that what you want to do?
You use the "RunCode" action and note that the procedure called needs to be a function (return a value - doesn't matter what, just that it does).

Jim.
Avatar of hellblazeruk

ASKER

This the access db, I would like to run the module in this file
POSSales.accdb
Again, you don't run 'Modules'. Modules contain either Functions or Sub.  Functions return a value and Subs do not. In a Macro, you can only run a Function (see screen shot above).

mx
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
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
thank you