Calling a VBA Routine

  • Thread starter Thread starter MarkS
  • Start date Start date
M

MarkS

Hi,

I have a button on a form which I want to run a piece of VBA code. It is in
a module called mdl_Control and the routine is called Control
How do I do this

Thanks MarkS
 
Note that Control is a reserved word in ACCESS, so it's possible that you
will get errors with your attempt. I strongly urge you to change the name of
the "routine" to something other than Control. Change it to ControlRoutine.
Then use the button's Click event to run VBA code similar to this:

Private Sub ButtonName_Click()
Call ControlRoutine
End Sub
 

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

Back
Top