Assign Module to Command Button

  • Thread starter Thread starter Andibevan
  • Start date Start date
A

Andibevan

Hi All,

Can someone tell me how I assign a module to a command button?

Thanks

Andy
 
You don't assign modules, you assign a function or subroutine within a
module.
 
And you do that through the properties associated with the Command Button.

If you have a function that you want run when the command button is clicked,
for instance, you would put the name of the function (complete with
parentheses), with an equal sign in front, in the box on the property sheet
beside On Click.

More common, though, is to set that property to [Event Procedure] (select it
from the combo box) and then click on the ellipsis (...) to the right. That
will take you into the VB Editor, into the Event Procedure associated with
the Click event of the button.
 
Sorry - I mean how do I assign a subroutine contained within a module to a
command button?
 
Thanks Doug - sometimes trying to find information on the really easy things
can be harder than finding info on more in-depth items.

Please ignore the mail I sent before I received your reply.

Douglas J Steele said:
And you do that through the properties associated with the Command Button.

If you have a function that you want run when the command button is clicked,
for instance, you would put the name of the function (complete with
parentheses), with an equal sign in front, in the box on the property sheet
beside On Click.

More common, though, is to set that property to [Event Procedure] (select it
from the combo box) and then click on the ellipsis (...) to the right. That
will take you into the VB Editor, into the Event Procedure associated with
the Click event of the button.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Dean said:
You don't assign modules, you assign a function or subroutine within a
module.
 

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