Assign a Module to a Form Button

This is a discussion on Assign a Module to a Form Button within the ADO DAO RDO RDS forums in Framework and Interface Programming category; I have created a module to send an email whne a form is completed. I wnat a command button to click and execute the module. I can't find where I can select a module to run at the "on-click" property. How do I do this?...

Go Back   Application Development Forum > Framework and Interface Programming > ADO DAO RDO RDS

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-07-2008, 06:05 PM
Dave Couch
Guest
 
Default Assign a Module to a Form Button

I have created a module to send an email whne a form is completed. I wnat a
command button to click and execute the module. I can't find where I can
select a module to run at the "on-click" property. How do I do this?
Reply With Quote
  #2  
Old 11-07-2008, 06:47 PM
fredg
Guest
 
Default Re: Assign a Module to a Form Button

On Fri, 7 Nov 2008 15:05:01 -0800, Dave Couch wrote:

> I have created a module to send an email whne a form is completed. I wnat a
> command button to click and execute the module. I can't find where I can
> select a module to run at the "on-click" property. How do I do this?


A module is just the place that you place your code.
What is the name of the sub procedure you placed within the module?
Let's say it's called
Sub SendEmail()

Using code from a command button Click event on your form, code:

SendEmail



--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Reply With Quote
  #3  
Old 11-10-2008, 12:49 PM
mcescher
Guest
 
Default Re: Assign a Module to a Form Button

On Nov 7, 5:05*pm, Dave Couch <DaveCo...@discussions.microsoft.com>
wrote:
> I have created a module to send an email whne a form is completed. *I wnat a
> command button to click and execute the module. *I can't find where I can
> select a module to run at the "on-click" property. *How do I do this?


In the design mode of the form, open the properties for the command
button. Scroll part way down to the OnClick event and click the
elipses (three dots) Select "Code Builder", and call your code from
there.

Hope this helps,
Chris M.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:19 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.