Hey all,
I am not able to integrate these 2 actions in one command. What i am doing is...
A button which sends a report with only specific data to a particular person (via outlook). I am able to filter the records using the where comand and i am able to send using the DoCmd.SendObject command. but only seperately. Is it possible to insert the where command in the DoCmd.SendObject syntax??
Thanks
5 7562 ADezii 8,834
Recognized Expert Expert
Is it possible to insert the where command in the DoCmd.SendObject syntax??
No, there is no WHERE Clause in the SendObject() Method. Modify the Record Source of the Report to correctly Filter the Output.
No, there is no WHERE Clause in the SendObject() Method. Modify the Record Source of the Report to correctly Filter the Output.
Hi,
But the filter is not always the same. For example if the user requires data from a particular date, only this data should go to the required person. This is where i meet with a problem. is it possible to save a filtered data and then send it each time?
Thanks
ADezii 8,834
Recognized Expert Expert
I haven't actually tried this, but how about? (I'm using the Catalog Report from the Northwind Database for this example): - Open the Report in Preview Mode Mode specifying your Where Clause
- DoCmd.OpenReport "Catalog", acViewPreview, , "[CategoryName] = 'Beverages'"
- Send the Report without listing its Name, this will efault to sending the Active Object
- DoCmd.SendObject acSendReport, , acFormatRTF, "BSimpson@aol.com", , , "Subject Matter", "Message Text", False
- Close the Report and Save it
- DoCmd.Close acReport, "Catalog", acSaveYes
I haven't actually tried this, but how about? (I'm using the Catalog Report from the Northwind Database for this example):- Open the Report in Preview Mode Mode specifying your Where Clause
- DoCmd.OpenReport "Catalog", acViewPreview, , "[CategoryName] = 'Beverages'"
- Send the Report without listing its Name, this will efault to sending the Active Object
- DoCmd.SendObject acSendReport, , acFormatRTF, "BSimpson@aol.com", , , "Subject Matter", "Message Text", False
- Close the Report and Save it
- DoCmd.Close acReport, "Catalog", acSaveYes
Yipeeeee.... It works ... thanks
ADezii 8,834
Recognized Expert Expert
Yipeeeee.... It works ... thanks
You are quite welcome, I wasn't actually sure if it would or not.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Bret Shortall |
last post by:
Using the SENDOBJECT action command in a Macro works fine if you hard
code in their email address.
SENDOBJECT TO bret@emailaddress.com
SUBJECT This is the Subject line...
|
by: Alfred |
last post by:
Hi
I am using access 2002
1.0 I want to email a word or html file using the docmd.sendobject The
document must be send as a attachment.
2.0 Second I would like to tell the Docmd.Sendobject to...
|
by: Cameron |
last post by:
Hi,
I've attempted to make use of the Microsoft Knowledge Base Article
"ACC97: How to Use a Recordset to Send Outlook E-Mail to Multiple
Recipients - 318881" but I can't get it to completely...
|
by: Lumpierbritches |
last post by:
Hello, and thank you in advance for any and all assistance. I'm having a
problem. This code worked years ago, what am I doing wrong?
Private Sub SendeMail_Click()
DoCmd.SendObject...
|
by: Mark |
last post by:
Hi All,
Is there a way to (whilst using the sendobject command) use a query as
the source of email addresses. I ask this because the list is constanly
changing and I don't want to keep going into...
| |
by: Marcus |
last post by:
Is there a way to have Access 2002 open a particular email client, when
using DoCmd.SendObject? So far, Access simply opens the default email
client that is set under Control Panel/Internet...
|
by: DP |
last post by:
hi,
is there a way to send an e-mail to a customer, using ms access?? or some
kind of automated mail merge, so the user only has to review the body, and
click send?
ive got a customer table,...
|
by: John Taylor |
last post by:
I have created a command button on a form that prints a filtered report and
e-mails the report to three people when "clicked". The three email addresses
are selected on the form by three combo...
|
by: iBasho |
last post by:
Hi,
I am trying to set up a notification email that would come to my email everytime users click on a command button in a form. I am using the DoCmd.SendObject command without actually sending any...
|
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,...
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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,...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |