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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Emailing a 'filtered' report from Access 2007

Status
Not open for further replies.

Hairy64

Technical User
Apr 24, 2006
10
US
I have a routine that works great for printing a filtered report. There is a form where you select the group you want, and press the print button. That executes a 'Select Case' routine and, depending on which case, executes a line similar to:
DoCmd.OpenReport stRptName, acViewNormal, , "Area=2"

Now I want to be able to press an email button and do the same thing. Problem is the DoCmd routine for SendObject doesn't allow for a 'Where Condition'.

Can anyone give me some help?

Thank You

Harry J.
 
Your first click will print a report that lists all records related to Area 2. Correct?

Now you wish to email this report?

What is the name of the report?
 
I would create a small table with the Area field and a single record with the value of 2. Use this table in your report's record source joining on the Area field. This results in filtering your report appropriately without a where condition.

Duane
Hook'D on Access
MS Access MVP
 
tsaawer and dhookuom,

Thank you both for the responses, but after about 10 plus hours I figured it out.

It may not be the most efficient way to do it, but it works - and if it ain't broke don't mess with it.

Again, Thanks to both of you.

Harry J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top