Filter reports when sending

tweetyksc

Registered User.
Local time
Today, 08:33
Joined
Aug 23, 2001
Messages
87
I'm trying to find a way to get this done, I've looked everywhere, tried everything, and am getting nowhere fast.

I have to generate a report separately for each separate "department". Query is complete, report is set up, and it's easy enough from a form where I can choose the department from a list box or type in....

What I'm trying to do now is automate it to run automatically with a table that has two fields-- "Dept" and "email" so that:
1. the report runs for the department
2. email is sent in snapshot form to the email address.
3. On to the next dept/email, etc.

-I know how to program SendObject to send a report automatically, if I hard code the report name and email address. It's the getting it to run for each department separately (pass the dept name) and sending to each email address I'm having trouble with.
i.e. do I filter the query or the report? I don't think you can filter a report programmatically...
-I've done loops before but not in a situation like this, i.e. I've never used a table to supply information to a query...

PLEASE HELP!!!!!
 
Let me clarify: You want to be able to, in one step, send a separate email to each department containing a report that is filtered based on that department, correct?

1st question: Are you using access 2k? If so, the sendobject cmd fails. Never fear, there is a solution. Let me know I'm right on the clarification first before I go dig it up.

If I'm correct then you will have to use a loop. Filtering the report will take sometime to figure for me. Can anyone else shine some light on this?
 

Users who are viewing this thread

Back
Top Bottom