I have searched this form and did google and yahoo but to no avail. I'm trying to send a report via email to email addresses listed in the report but I’m not getting anywhere. This is what I have so far.... -
Function Macro1()
-
On Error GoTo Macro1_Err
-
Dim strSendTo As String
-
strSendTo = ProjectManagerEMail
-
-
DoCmd.SendObject acReport, "month", "SnapshotFormat(*.snp)", strSendTo, "", "", "", "", False, ""
-
-
-
Macro1_Exit:
-
Exit Function
-
-
Macro1_Err:
-
MsgBox Error$
-
Resume Macro1_Exit
-
-
End Function
-
I also tried creating another table with just email addresses but couldn't get that to work either. please help. What am I doing wrong?
To state the obvious: I’m very new at this!
5 2012
I have searched this form and did google and yahoo but to no avail. I'm trying to send a report via email to email addresses listed in the report but I’m not getting anywhere. This is what I have so far....
Function Macro1()
On Error GoTo Macro1_Err
Dim strSendTo As String
strSendTo = ProjectManagerEMail
DoCmd.SendObject acReport, "month", "SnapshotFormat(*.snp)", strSendTo, "", "", "", "", False, ""
Macro1_Exit:
Exit Function
Macro1_Err:
MsgBox Error$
Resume Macro1_Exit
End Function
I also tried creating another table with just email addresses but couldn't get that to work either. please help. What am I doing wrong?
To state the obvious: I’m very new at this!
I haven't had a chance to test the mailing feature of Access, though I have looked into in recently for a proposed module. Below I will include a couple links I have on mailing from Access that may help you, but first there is something in your code that might be causing you the error.
Try switching the DoCmd line to the following and see if it works out: -
DoCmd.SendObject acSendReport, "month", "SnapshotFormat(*.snp)", strSendTo, , , , , False
-
If this doesn't work I would look furthing into the matter with the following links Sending Email From Access (Advanced) Sending Email From Access (Beginner)
Hope some of this helps you.
- Minion -
Nope, that didn't work :(
I have looked at those two articles before and am currently palying with the code to make it work for me.
There got to be something in between those two methods discussed by the articles you have pasted the url for. I'm think there got to be a way to add couple lines of code to grab the email address from a query, no?
My first question is where is ProjectManagerEmail coming from? Is this a control on a form? Is the form open?
You have written your code in a function. Where is this function written and how and where is it called?
My first question is where is ProjectManagerEmail coming from? Is this a control on a form? Is the form open?
You have written your code in a function. Where is this function written and how and where is it called?
I have a table which contains a filed label ProjectManagerEmail. I created a micro and then converted that to a module. I have very limited programing and access knowledge...function is created by access.
report which i would like to email also contains ProjectMangerEmail field.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Martoni |
last post by:
I need to parse a string with an embedded email address.
The string always has the format NAME (name@domain) SOMETEXT.
What I need to get is the email address as name@domain.
I came up with this...
|
by: James Hong |
last post by:
Help please, I try to sending an email from my html page using the java
applet.
but it give error on most of the PC only very few work, what is the error i
make
the java applet show as below
...
|
by: MikeM |
last post by:
The email address stays through each loop and keeps adding the next
email address. joe@email.com then the next run would be joe@email.com;
mike@email.com etc... The subject and the attached file...
|
by: Del |
last post by:
I have two question on sending email messages from MS Access (Versio
2000, 2002, and 2003). I have a form with a command button to send an
email message, the code behide the button is as follows;...
|
by: acni |
last post by:
I have the following peice of code to try and send an email to selected
contacts in my form.The problem is this line:
StrStore = DLookup("", "qrySelectEmail", "??????")
This looks up the email...
|
by: Brian Henry |
last post by:
I have a domain cluster with AD running, and I want to lookup a users email
address (exchange 2000 server is integrated with the AD system) so i can
email the user based on their user name. does...
|
by: Jason |
last post by:
I'm writing a simple EXE in VB.NET to be run on our intranet (Win2K network,
XP machines). When it's done running I want to notify the user via email.
I've got the email working...how do I...
|
by: darklink64 |
last post by:
Hi,
I've recently set up a database, but have not experience of VBA and
need to find a way of solving this problem.
Basically, I would like to make a form with two buttons. On clicking
one...
|
by: comp.lang.php |
last post by:
I came up with functions that I thought would do the trick:
if (!function_exists('smtp_close')) {
/**
* This function will close a socket resource handle
*
* Original function found at...
|
by: creative1 |
last post by:
When I test the application I get follwowing error:
could not connect to smtp host: connection timeout error
can someone please check if I have rigth settings? Where I am wrong here
Is IP and...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |