473,668 Members | 2,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 2002 doCmd.Sendrepor t filter?

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
3 3778
Sorry folks..... the command being used is doCmd.Sendobjec t

"Baz'noid" <ba***@rtd.uk.. com> wrote in message
news:bn******** **@titan.btinte rnet.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
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.bti nternet.com...
Sorry folks..... the command being used is doCmd.Sendobjec t

"Baz'noid" <ba***@rtd.uk.. com> wrote in message
news:bn******** **@titan.btinte rnet.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
Brill thanks Steve - much appreciated - i'll look at the first option as
it's the easiest!!!

Cheers,
Barry
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3364
by: Dirkpitt84 | last post by:
If Index = 0 Then Dim ac As Access.Application Set ac = CreateObject("Access.Application") ac.Visible = True ' se non lo metto, non fa l'anteprima ac.DoCmd.RunCommand acCmdAppMaximize ' espande Access ac.OpenCurrentDatabase (nome_db), False ac.DoCmd.OpenReport "scheda_report", acViewPreview, , "=" & Chr(34) & id & Chr(34) ac.DoCmd.Maximize ac.Application.Visible = True
14
5406
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB 7.2 environment, the choices the optimizer makes often seem flaky. But this last example really floored me. I was hoping someone could explain why I get worse response time when the optimizer uses two indexes, than when it uses one. Some context:
1
1960
by: P.Pfister | last post by:
hi all i have this short source code: --- Dim varElem As Variant Dim strSQL As String Dim i As Integer Dim frm As Form Set dbs = CurrentDb
7
8852
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
3
4897
by: Jorge Cecílio | last post by:
Hi! I would like to export some MS-Access reports output to pdf. However, the only possibility offered by Access (afaik) for me to export formatted output is snp (snapshot) (I use MS-Office XP Prof. 2002 version). With formatted output I mean the *exactly* output I produce from executing my report (information is gathered from an ODBC database).
11
6587
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
2
14115
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002 database? Thanks, Dean Slindee
6
1728
by: ET | last post by:
Dear All, I have once made a mdb file using access 2000 under Windows 2000. I didn't use it for long. Today I tried but some codes just didn't work. I am using Access 2002 and Windows XP. I have absolutely no idea what's going on. These are the problematic codes, thank you very much for your kind suggestion and help. Paul From Bratislava, Slovakia -------------------------------------------
6
26305
by: provor | last post by:
Hello, I have the following code that I am using when a user presses a button to import an excel file into a table. The code is hard coded to point to the correct table. This works great for this one table. My problem is I have two buttons I want to use this code for for the two buttons would put the data in different tables. I have tried copying and changing a few things and nothing will work for me. The code is set up in a module and then I...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8378
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.