Gowey Mike W
Mike.W.Gowey at doc.state.or.us
Wed May 18 09:18:13 CDT 2005
Roz,
This looks pretty good, I tried it out, but it errors out on the
following part, saying it can't find "txtbody"
DoCmd.SendObject acSendReport, "rpt_MONTHLYLimitationDatesCLH",
acFormatRTF, rsRecipients!CLH, , , "Limitation Report", _
Me!txtBody, True
What are you referring to on the last part of the above line
"Limitation Report", Me!txtBody, True
Thanks so much for your help.
Mike Gowey MCDST, A+, LME, NET+
Team Leader - East Region
Information Systems Unit
-----Original Message-----
From: Roz Clarke [mailto:roz.clarke at donnslaw.co.uk]
Sent: Wednesday, May 18, 2005 7:58 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] E-mail Report
I do something like this in the code below:
Dim cnn As New ADODB.Connection
Dim rsRecipients As New ADODB.Recordset
Set cnn = CurrentProject.Connection
rsRecipients.Open "qryLimitationRecipients", cnn, adOpenForwardOnly
If rsRecipients.EOF = True And rsRecipients.BOF = True Then
MsgBox "No results returned"
Else
rsRecipients.MoveFirst
Do Until rsRecipients.EOF = True
DoCmd.OpenReport "rpt_MONTHLYLimitationDatesCLH", acViewPreview,
, "CLH = '" & rsRecipients!CLH & "'"
DoCmd.SendObject acSendReport, "rpt_MONTHLYLimitationDatesCLH",
acFormatRTF, rsRecipients!CLH, , , "Limitation Report", _
Me!txtBody, True
DoCmd.Close acReport, "rpt_MONTHLYLimitationDatesCLH"
rsRecipients.MoveNext
Loop
End If
In this instance CLH is the field in my recordset containing the email
address. I am running a report filtered for each row in the recordset so
that people get the records relating to themselves.
HTH
Roz
-----Original Message-----
From: Gowey Mike W [mailto:Mike.W.Gowey at doc.state.or.us]
Sent: 18 May 2005 14:42
To: Access Developers discussion and problem solving
Subject: [AccessD] E-mail Report
Is there a way to run a query from a customer table and grab the e-mail
address of certain customers and e-mail each one of them a
report/letter.
Any help would be greatly appreciated.
Thanks in advance,
Mike Gowey MCDST, A+, LME, NET+
Team Leader - East Region
Information Systems Unit
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com