Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run a module

Status
Not open for further replies.

IKinal

Technical User
Apr 14, 2003
32
US
Hi,

I wrote several modules in my Access 2002 database, and I now want to run them, but I can't, because the run button in the modules view is greyed out. How can I get the button to work?

Thanks,
I. Kinal
 
Hello

Modules themselves can't be run as standalone applications; the subs and functions within them can be executed by calling them from event handers within forms, reports etc or from macros with the RunCode action.

For example

result = FunctionName (ParameterList)

or

SubName

If the module is a class module, then it has to be instantiated and called from another VBA routine.

Hope that this helps.

John
 
Thanks for the info. I have solved the problem by using a runcode macro. Of course, now I'm wondering what the purpose of that run button on the modules page is?

I. Kinal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top