By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,122 Members | 921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,122 IT Pros & Developers. It's quick & easy.

Access 2002 doCmd.Sendreport filter?

P: n/a
Hi all,

With the recent postal strikes here in the UK i'm trying to persuade access
to email reports at the touch of a button. I've not been able to figure out
how to filter the report - when i print a report via a button i have it
filtering to just the customer and invoice on the form on screen, but when i
email, it uses the customer details on screen for the email address but
produces a separate HTML file for EVERY customer on the database and
attaches it to the email.

Does anyone know how i can filter it, and if it all possible, make the
invoice appear in the body of the email instead of any attachment?

Thanks guys n gals,

Barry Wellington.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Sorry folks..... the command being used is doCmd.Sendobject

"Baz'noid" <ba***@rtd.uk..com> wrote in message
news:bn**********@titan.btinternet.com...
Hi all,

With the recent postal strikes here in the UK i'm trying to persuade access to email reports at the touch of a button. I've not been able to figure out how to filter the report - when i print a report via a button i have it
filtering to just the customer and invoice on the form on screen, but when i email, it uses the customer details on screen for the email address but
produces a separate HTML file for EVERY customer on the database and
attaches it to the email.

Does anyone know how i can filter it, and if it all possible, make the
invoice appear in the body of the email instead of any attachment?

Thanks guys n gals,

Barry Wellington.

Nov 12 '05 #2

P: n/a
SA
Barry:

As you've found, the SendObject method doesn't support filters. There are a
couple work arounds:

1.) You can use a form and set the report's underlying query to use controls
on the form as filter criteria, i.e. the standard filter by form.
2.) You can set a filter for the report and save it before calling
sendobject (a pain)
3.) You can modify your query to allow you to supply a filter via vba at run
time along the lines of the tip on our web site in the Code and Design tips
area under reports.

Alternately you could move to a totally different way to mail your report,
avoiding SendObject entirely. You might want to take a look at our PDF and
Mail Libray, which would allow you to email PDF copies of your reports
(filtered as well).
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

"Baz'noid" <ba***@rtd.uk..com> wrote in message
news:bn**********@hercules.btinternet.com...
Sorry folks..... the command being used is doCmd.Sendobject

"Baz'noid" <ba***@rtd.uk..com> wrote in message
news:bn**********@titan.btinternet.com...
Hi all,

With the recent postal strikes here in the UK i'm trying to persuade access
to email reports at the touch of a button. I've not been able to figure

out
how to filter the report - when i print a report via a button i have it
filtering to just the customer and invoice on the form on screen, but

when i
email, it uses the customer details on screen for the email address but
produces a separate HTML file for EVERY customer on the database and
attaches it to the email.

Does anyone know how i can filter it, and if it all possible, make the
invoice appear in the body of the email instead of any attachment?

Thanks guys n gals,

Barry Wellington.


Nov 12 '05 #3

P: n/a
Brill thanks Steve - much appreciated - i'll look at the first option as
it's the easiest!!!

Cheers,
Barry
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.