Splitting up a report.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all, I have yet another question. I have a report that I export to
snapshot format. In the report there are multiple clients (30 or so) and they
are all on separate pages. This reports need to be emailed to the clients but
I want a client to only get his info and not be able to see the other
clients. Currently there is someone who exports it page by page and emails
them out.

Is there a way that I could make a macro do this? Or is there another more
effective way to do this? Thanks for any help you can offer!

James O
 
Hi James

You will need to use VBA code rather than a macro do to this.

SendObject can fire off the report to someone, so to send 30 or so emails,
you will need to:
1 OpenRecordset(), using a SQL string that chooses the clients who need to
receive the report, and their email addresses.

2. Declare a public string variable, so you can limit the report to just one
client.

3. Loop through the recordset, assigning a WhereCondition to the string, and
calling SendObject.

4. Use the Open event of the report to check the public string, and apply it
as a filter, so each person only gets their own page. Then clear public the
string.
 
Back
Top