Email reports in 2007

J

JR Hester

access 2007 on WinXP
After reading through numerous posts in this forum, I settled on what
appeared to be the closest solution to my issue. The code below is included
as the action to perform from a switchboard command button-- it is one
continous line.

DoCmd.SendObject acReport,"rpt ConfirmationLetter4testing*",
acFormatRTF,"ContactNumber",,,"test confirmation",,True

Upon executing I immediately get a "error executing command" error message.

I have a working report named rpt ConfirmationLetter4testing which is based
on a query named "qry ConfirmationLetter". Qry Confirmation Letter includes a
field named ContactNumber which currently holds the email address to which I
want each individual report emailed to.

The Query initatiates a dolog box to get begining and ending date criteria
for the report data. Ideally I hope to generate this confiramtion letter
report directly to the email address contained in the query results.

Pointers on where I am missing the boat will be greatly appreciated. My VBA
skills are very minimal, but am willing to learn.

I tried to follow suggetsion from a previous poster and view Access Help for
SendObject method, but could only find SendObject MAcro help.

Thanks for your time and assistance
 
G

Gina Whipp

JR Hester,

I do not belive what you want to do can be done with SendObject... Have a
look at...

Code to sent Multiple eMails:
http://www.datastrat.com/Code/MultipleEmail.txt

Download sample database EmalSenate2K (PLEASE do not send eMail from this
database to the eMails shown. This is for demonstration purposes only!):
http://www.datastrat.com/DataStrat2.html

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
access 2007 on WinXP
After reading through numerous posts in this forum, I settled on what
appeared to be the closest solution to my issue. The code below is included
as the action to perform from a switchboard command button-- it is one
continous line.

DoCmd.SendObject acReport,"rpt ConfirmationLetter4testing*",
acFormatRTF,"ContactNumber",,,"test confirmation",,True

Upon executing I immediately get a "error executing command" error message.

I have a working report named rpt ConfirmationLetter4testing which is based
on a query named "qry ConfirmationLetter". Qry Confirmation Letter includes
a
field named ContactNumber which currently holds the email address to which I
want each individual report emailed to.

The Query initatiates a dolog box to get begining and ending date criteria
for the report data. Ideally I hope to generate this confiramtion letter
report directly to the email address contained in the query results.

Pointers on where I am missing the boat will be greatly appreciated. My VBA
skills are very minimal, but am willing to learn.

I tried to follow suggetsion from a previous poster and view Access Help for
SendObject method, but could only find SendObject MAcro help.

Thanks for your time and assistance
 

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

Top