Results 1 to 2 of 2
2005-03-29, 15:45 #1
- Join Date
- Jan 2004
- Thanked 0 Times in 0 Posts
email rpt only when populated (2003)
I have a db that I track different materails by vendor (ie. stone, sand, cement, etc.). I have 18 reports, one for each vendor of each material. I am wanting to email these reports out each week to let the vendors know what is ahead on our schedule for them. What I am wanting to do is only send out a rpt if the specific query attached to that vendors rpt is not null, can someone help me with this? As I have currently, there is a query specific for that vendor for that material and a corrseponding rpt. I am also wondering if there is a better way to have the info setup?
2005-03-29, 18:47 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: email rpt only when populated (2003)
It would be more efficient to have one query that returns the data for all vendors and materials, and one report based on this query. You can filter the report for a specific vendor and material.
The code in <post#=275460>post 275460</post#> shows how to send filtered reports for one variable (employee name in the example); it can easily be adapted for two variables (vendor and material). You can add a test to see if the filtered query returns records, using the DCount function.
If you need more help, please provide specific information (what are the names and data types of the fields you want to filter on, for example).