PC Review


Reply
Thread Tools Rate Thread

Assign a Module to a Form Button

 
 
Dave Couch
Guest
Posts: n/a
 
      7th Nov 2008
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
 
 
 
 
fredg
Guest
Posts: n/a
 
      7th Nov 2008
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
 
mcescher
Guest
Posts: n/a
 
      10th Nov 2008
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
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run a module from a button on a form Steve in S.F. Microsoft Access VBA Modules 3 7th Mar 2009 08:42 PM
How to assign a hyperlink to a button on a form? Bremser Microsoft Excel Programming 2 26th Mar 2008 11:22 PM
Custom Task Form - Assign Button steve Microsoft Outlook Form Programming 1 8th Jul 2007 07:36 PM
command button to open form needs to assign values =?Utf-8?B?QW1hbmRhIEJ5cm5l?= Microsoft Access Form Coding 1 16th May 2007 11:27 PM
Assign Module to Command Button Andibevan Microsoft Access 4 9th Nov 2005 02:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 PM.