Report Distribution

G

Guest

I have a report sorted by physicians and it prints to 600 pages. I need to
save the report pdf format individually for each physician so I can e-mail it
to them. Is there a way of doing this automaticall without me having to run
about 100 separate reports? Any help/suggestion will be greatly appreciated.

Thanks
 
H

HiTechCoach via AccessMonster.com

To answer another thread, I have posted a working example of how to do this
type of task here

http://www.utteraccess.com/forums/showflat.php?Cat=&Number=1319913&page=&view=&sb=5&o=&fpart=1&vc=1


using a tools to create PDF's from here

http://www.lebans.com/reporttopdf.htm

Code for the above example:

Dim qdf As DAO.QueryDef
Dim strSQL As String
Dim strPathName As String
Dim blRet As Boolean
Dim rs As Recordset


strSQL = "SELECT customer.customerID, customer.cusname FROM customer;"

Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)


If rs.RecordCount < 1 Then
Exit Sub
End If

Do

Set qdf = CurrentDb.QueryDefs("customer Query")
strSQL = "SELECT customer.customerID, customer.cusname, customer.
cusnum, customer.testmemo FROM customer"
strSQL = strSQL & " WHERE (((customer.customerID)=" & rs!customerID &
"));"
qdf.SQL = strSQL
qdf.Close
Set qdf = Nothing

' put in the my documnets folder
' strPathName = Environ("userprofile") & "\my documents\" & Me.
cbocustomerID.Column(1) & ".pdf"

strPathName = rs!cusname & ".pdf"


blRet = ConvertReportToPDF("customer Query", vbNullString,
strPathName, False, False, 0, "", "", 0, 0)

rs.MoveNext

Loop Until rs.EOF

rs.Close

Set rs = Nothing
:
 

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