Emailing Report

S

Sprinks

I have a report that we use to bid out various pieces of equipment. The
equipment detail has a MfrID field (foreign key to Mfrs), and each
manufacturer has an associated Rep, to whom I send the Request For Quote.

The report is grouped on Rep, and then on Manufacturer, as one Rep might be
bidding equipment for several different manufacturers on the same job.

Up until now, our report page breaks on Rep, and we've faxed the sheets to
the various bidders. We would like now, however, to email them to save the
labor and paper.

Can anyone refer me to a description of or explain how to do this? We'd of
course like to preview the document(s) before firing.

Thank you.
Sprinks
 
L

Larry Daugherty

Your first issue to resolve is: What are you going to attach to the
email? Report Snapshot, PDF, ??

The next issue is that you'll need to generate your report for a
single rep per run. Since you plan to preview them before mailing,
that looks like a non-problem.

There are a number of ways to achieve what you've broadly stated

HTH
 
S

Sprinks

Larry,

I don't know what a "Report Snapshot" is, but all I really need is to convey
the information in a format similar to my report, which will have some header
information, and then a tabular display of items:

ItemID Qty Description Part Number
--------- ----------- -------------------------------- -----------------------
A1 135 Metal Halide Downlight ASD-23-1234-277
....etc.

I can develop the code to loop through the report for each member. Can you
help me with the code to send the emails?

Thanks for your help.
Sprinks
 
L

Larry Daugherty

There is a free Snapshot Viewer downloadable from MS or it may also be
on the Office DVD/CD or in MSDN goodies. You can save each report as
a snapshot after previewing and attach it to an email to your rep.
You'd need to send the Snapshot Viewer to each of them one time and
help them get it set up. With judicious file association they should
then be able to read your Access reports as you see them. I've
started to look at the viewer several times but the process was always
short circuited by other implementation decisions.

There is a lot of related info on Tony Toews's site in his EMAIL FAQ
section. That's where I started and proceeded from there to the
Redemption site and it seemed like I was chasing my tail for a while.
Eventually it came together.

I found that a lot of the stuff didn't work as advertised because
microsoft has screwed around with Outlook putting in security breaks
that interrupt the smooth flow. At the point where I had the
functionality that I figured I'd have to live with, I could do
everything in my app except actually get the mail to go. When I
looked into the Outlook session there was an empty message sitting in
the Inbox. Hit send & Recieve and the whole queue went and the empty
message disappeared. That was good enough for what I needed I didn't
generalize my code so it's pretty well hard wired in scattered bits
and pieces.

I wouldn't think you'd be able to make use of looping unless you break
into the loop while stepping through a recordset firing out the
reports and associated emails.

Another approach might be to do a lot of the above but to print to PDF
documents. I use CutePDFWriter - absolutely free. By making that
your printer it will ask you to name each document just before you
create it.

You'd be surprised how much Access Email activity there is. Google on
the Access groups for "email" and it will blow you away.


=========================================================
I just hijacked the below from a related post today in this ng.

Arvin, thankx for the quick reply. But you went a little over my
head. Can
you put the advice in laymens terms? I can follow directions, but I
know
nothing about code. I haven't tried this yet as I don't want to
upsept
members with practice runs.

Let's say I have the message ready to send, and I have the list of
addresses...I should put all the addresses in the BCC field?
Where do I tell Outlook that it's ok?
What is Redemption?
Where do I use the code?
Buseruka

Arvin Meyer said:
This code was written before the security functionality in Outlook was
created. It used to go automatically, but now you'll need to tell Outlook
that it's OK, or use Redemption.It works by using the BCC field to send
email:Function Email(strTo As String, strSubject _
As String, Optional varMsg As Variant, Optional varAttachment As
Variant)

' ©Arvin Meyer 1999-2004
' Permission to use is granted if copyright notice is left intact.
' Permisssion is denied for use with unsolicited commercial email

'Set reference to Outlook
On Error GoTo Errhandler
Dim strBCC As String
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim objOutl As Outlook.Application
'Dim objEml As Outlook.MailItem
Dim i As Integer

Set db = CurrentDb
Set rst = db.OpenRecordset("qryContacts", dbOpenSnapshot)

Set objOutl = CreateObject("Outlook.application")
'Set objEml = objOutl.createItem(olMailitem)

With rst
If .RecordCount > 0 Then
.MoveLast
.MoveFirst
End If
End With

For i = 1 To rst.RecordCount
If Len(rst!EmailAddress) > 0 Then
strTo = rst!EmailAddress
Dim objEml As Outlook.MailItem
Set objEml = objOutl.createItem(olMailitem)

With objEml
.BCC = strTo

.Subject = strSubject

If Not IsNull(varMsg) Then
.Body = varMsg
End If

' Uncomment for attachment
' If Not IsMissing(varAttachment) Then
' .Attachments.Add varAttachment
' End If

.Send
End With
End If
Set objEml = Nothing
rst.MoveNext
Next i

ExitHere:
Set objOutl = Nothing
'Set objEml = Nothing
Set rst = Nothing
Set db = Nothing

Exit Function

Errhandler:
MsgBox Err.Number & ": " & Err.Description
Resume ExitHere

End Function-- Arvin Meyer, MCP, MVPMicrosoft AccessFree Access
downloads:http://www.datastrat.comhttp://www.mvps.org/access
school. I
need done
=======================================================

HTH
 
S

Sprinks

Larry,

Thank you for your informative post, and suggestions for searching
additional resources.

Sprinks
 
U

'use_real_email'

Following this one as well.

Les


--
Lee B

*The Walkonzone is funded by Paintball Players 4 Paintball Players. If
you like our site please be kind enough to make a donation.
All donations go towards ISP costs and keeping the site alive.<br>
Thank you for your support.*
<form action="https://www.paypal.com/cgi-bin/webscr"
method="post"><input type="image"
src="https://www.paypal.com/images/x-click-but04.gif" border="0"
name="submit" alt="Make payments with PayPal to the Walkonzone - it's
fast, free and secure!"><input type="hidden" name="cmd"
value="_xclick"><input type="hidden" name="business"
value="(e-mail address removed)"><input type="hidden" name="item_name"
value="Walkonzone"><input type="hidden" name="item_number"
value="A2"><input type="hidden" name="no_note" value="1"><input
type="hidden" name="currency_code" value="GBP"><input type="hidden"
name="tax" value="0"></form>
 

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

Similar Threads

Creating Summary Reports from Two Tables 2
vlookup? 5
Access 2007 Report Question 1
Expandable list in report? 2
Combo Box Fill-In 2
Report 0
Design Questions 4
email multiple reports from one report 10

Top