Button to get a module to run

R

RobertM

Hello:
I converted a Macro to a Module last week. The task runs much better as a
module. The problem that I'm having is that I need to be able to run the
module from a command button. I have no problem doing this from a macro, but
I have no idea how to do this with a module. I have a good knowledge of
Access and an almost non existant knowledge of VB.

Any suggestions

Thank you
 
O

Ofer

In the module, did you create a function or a sub?
Do you return a value with the function, if a function.?
Do you pass parameters?
 
S

Steve Schapel

Robert,

In the design view of the form, go to the Property Sheet for the Command
Button, and in the On Click event property, instead of entering the name
of the macro, enter Event Procedure, and then click the little Ellipsis
(...) button to the right, which will take you into the VB Editor
window. Type the code for the module in there. Please post back if you
need more detailed help.

Interesting that you say that the task runs better as a module... this
is unusual.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top