473,624 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending emai via access form

106 New Member
Let say I have a form (MS Access) with the list of people and their email addresses and a text field which I can write my message.
I have button that when I press the button I want it to send email to all email adressess in this form.

Is this possible.

Or there is a better way of doing this, please help.
Oct 24 '06 #1
32 13983
MMcCarthy
14,534 Recognized Expert Moderator MVP
Let say I have a form (MS Access) with the list of people and their email addresses and a text field which I can write my message.
I have button that when I press the button I want it to send email to all email adressess in this form.

Is this possible.

Or there is a better way of doing this, please help.
Do you want to send the message to everyone in the list or only those selected?
Oct 24 '06 #2
tara99
106 New Member
Do you want to send the message to everyone in the list or only those selected?
Thank you for your help
The selected ones

The one I have availabe in the form becuase I run qurey on the backgroud which only displayes those emails I need.

Thanks
Oct 24 '06 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
Sorry Tara

I understood from your first post that these people were in a list. Are they just separate records on the form and therefore the list is based on the query behind the record source of the form?


Thank you for your help
The selected ones

The one I have availabe in the form becuase I run qurey on the backgroud which only displayes those emails I need.

Thanks
Oct 24 '06 #4
tara99
106 New Member
Sorry Tara

I understood from your first post that these people were in a list. Are they just separate records on the form and therefore the list is based on the query behind the record source of the form?
Hi

Yes they are part of the list
you see I have this table which hold the list of name and their email addresses.

The form shows selected email address based on some criteria.

I hope this helps.
Oct 24 '06 #5
MMcCarthy
14,534 Recognized Expert Moderator MVP
Sorry Tara

Still trying to clarify.

Is there an actual ListBox on your form with a RowSource of the names and emails

OR

have you designed a form to return names and emails of specified people based on a query?


Hi

Yes they are part of the list
you see I have this table which hold the list of name and their email addresses.

The form shows selected email address based on some criteria.

I hope this helps.
Oct 24 '06 #6
tara99
106 New Member
Ok
lets go a stet back,
I have a form that have a list box contaning the list of items that are availabe in my database, and a button next to it.
When a user select a item from the list and click on the button it will open a new form with information about that selected item in my case contacts name and email address. (there may be 1 contact per item or could be 100 contacts per item), now I have a button called send email, when I press it I want it to send email to those contacts.
I hope it is clear now, let me know if it is not

Thanks
Oct 24 '06 #7
MMcCarthy
14,534 Recognized Expert Moderator MVP
OK, try this:

Put this function in a module:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Function sendEmail(emailAddresses As String, subjectLine As String, message As String)
  3.     ' send the email
  4.     DoCmd.SendObject acSendNoObject, , , emailAddresses, , , subjectLine, message, False
  5.  
  6. End Function
  7.  
  8.  
Go to the Data tab and set the Bound Column to 2 (Assumes 2 columns Name and email in the listbox).
Put a second text box on your form to enter the Subject Line, I'm calling it subjectTxt for this example
I'm calling the message textbox messageTxt.
Note in your listbox in the email column all email addresses have to be separated using semi colons

Then behind the email button put the following code.

Expand|Select|Wrap|Line Numbers
  1.  
  2. sendEMail(lstBoxName, subjectTxt, messageTxt)
  3.  
  4.  
Oct 24 '06 #8
tara99
106 New Member
OK, try this:

Put this function in a module:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Function sendEmail(emailAddresses As String, subjectLine As String, message As String)
  3.     ' send the email
  4.     DoCmd.SendObject acSendNoObject, , , emailAddresses, , , subjectLine, message, False
  5.  
  6. End Function
  7.  
  8.  
Go to the Data tab and set the Bound Column to 2 (Assumes 2 columns Name and email in the listbox).
Put a second text box on your form to enter the Subject Line, I'm calling it subjectTxt for this example
I'm calling the message textbox messageTxt.
Note in your listbox in the email column all email addresses have to be separated using semi colons

Then behind the email button put the following code.

Expand|Select|Wrap|Line Numbers
  1.  
  2. sendEMail(lstBoxName, subjectTxt, messageTxt)
  3.  
  4.  
Thank you so much Mccarty

I will try this, and please keep an ey open for this subject I may be back soon

Thanks again heaps
Oct 24 '06 #9
tara99
106 New Member
Thank you so much Mccarty

I will try this, and please keep an ey open for this subject I may be back soon

Thanks again heaps
I tried that code, it gave me error, some thing about sendobject
???
Oct 25 '06 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
11691
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. tCetecM1CUST (SQL Table that contains the Customer Information) tAccountingDetail (SQL Table that contains the information in the form) frmAccountingEntry (Access form used to enter data) spGetCustomerInformation (Stored Procedure which returns data using...
1
1686
by: Fred F. | last post by:
Here is my problem. From an ACCESS form, I run a C++ process reaching the same database in read/write mode via the ODBC driver. An error occurs: " The database has been placed by an unknown user in a state preventing it from being opened either locked. SQLSetConnectAttr failure of the pilot " (Nota : translated approximatively from the french error message). However, if I have used an another form before (eg. to modify a table), or if I...
1
2633
by: Arend Jan Nijenhuis | last post by:
Hi, I'm fairly new to .Net, but an expert in Microsoft Access VBA. For a large Access application, I want to create some sort of custom control (COM interop?) in VB.Net, to be used in an Access form. The control needs to put together a simple design drawing for building constructors, based on some values in the Access form. Can it be done?
6
11636
by: Oscar N. Goyee | last post by:
Well, its sames difficult for me; I love access so much and wish to make it perform extra task. I prepared an HTML form but can not connect it to my access table and so I think it is possible to make an access form a standalone form for user input. Can anyone assist. My mail add is dianafather@aim.com. *** Sent via Developersdex http://www.developersdex.com ***
6
2525
by: Jack | last post by:
Hi, I have an Access application which need to be converted to asp-sql server application. This Access application uses a single form. This form has got a SS number with names and age. The form has two subforms. One of the subform uses a physical test score which is basically four different fields while the other subform is one that has a written test score with three fields. Entry to both physical and written scores are done through this...
2
4946
by: John | last post by:
I have an Access 2000 form that has a Hyperlink that opens an Excel 2000 worksheet located in the same network folder as the Access MDB. The Hyperlink works great. When users close the Excel File, they must choose the correct open Access form on the Windows Desktop Taskbar to return to the Access form that had the Hyperlink. Is there a way to:
1
3468
by: burtell | last post by:
Previously, I wrote: I have designed an HTML form. The name of each element corresponds to a heading in an Access database on my computer. Is there a way for me to program the HTML form to send the data from the form through my email address in such a way that the data can be imported easily into the appropriate cells of the Access form? Is there a tutorial for that anywhere? Are there instructions available anywhere? Or can it be done? ...
0
1389
by: charlie weaver | last post by:
Is it possible to send an email in HTML format using and Access Form created with VB 6? Currently my form sends as RTF, but I cant seem to figure out how to send in HTML format.
16
11801
by: John | last post by:
I am looking for VBA code that will work with Access 2003 to enable dragging and dropping a file/folder name from Windows XP Explorer into an Access form's text box. This is a common functionality that most Windows programs have, so I'm suprised it's not easier to implement in Access/VBA. Through Google, I found two VB6 examples and one VBA example on the Access Web written by Dev Ashish. The VB6 examples used loops to keep checking...
7
13161
by: kpresidente | last post by:
Hello all, I'm trying to transfer the value of a control on an Access form to an Excel worksheet using VBA. The Access form is a single form with all the controls disabled, so that data is "read only." I have a button on the form which opens the Excel worksheet, which then basically serves as the input form for the Access database. What I need is to somehow get the primary key (EstimateID) of the current record on the Access form...
0
8168
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6107
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2603
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.