Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple access reports 1

Status
Not open for further replies.

normany

Programmer
Nov 23, 2005
1
GB
I have a report which has about 20 client details on, which I need to send to multiple clients, but only their particular part of the report. I have split the report to print a new client on a new page. Can anyone tell me how to do this. Their email addresses are on the report. I have read somewhere about re-running the report multiple times for each client but I don't know how to do this automatically. It could be for any number of clients on any particular day. I am running access 2000.
 
Assuming the report is grouped by client, set the Client Header "Force New Page" property to "After". This will start a new page for each client.

Let them hate - so long as they fear... Lucius Accius
 
I don't know 100% how to do this, but here are some thoughts -

1. Have the query behind the report set to require the client ID before running.

2. do a loop in vba that finds each client in your client table and uses the client ID to run the report. (I'm not comfortable with loops yet, but I'm sure someone here will fill you in on the part.)


3. instead of opening the report, email it. Something like this:

Dim strRecipient As String
Dim stDocName As String
Dim strSubject As String
Dim strMessage As String


strRecipient = [wherever you get the client's email]
strDocName = "name of report"
strSubject = "line you want in the subject of the email"
strMessage = "anything you want in the body of the email"

DoCmd.SendObject acReport, stDocName, "choose your format", strRecipient, , "", strSubject, strMessage, False, ""


Then instead of running the report you will run this code that will e-mail the report to one person at a time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top