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

Send two objects by e-mail

P: 36
Hello !

I Try to send two objects reports with this code

DoCmd.SendObject acReport, "TEST1", "TEST2", acFormatSNP,

The reports are Test1 and Test2. But don't work because the comma passed to the format and the code no permit to write other object.

How this code permit to include two objects for send in a command botton?

Thanks everyone!
Mar 18 '08 #1
Share this Question
Share on Google+
2 Replies

P: 20
Hi ElTipo,

I haven't used the send object before, but you say it won't work because your using the comma in a way to send two reports in the one line of code. If you put a comma in between TEST1 and TEST2, wouldn't it give the next criteria for the DoCmd.SendObject command?.

If taking out the TEST2 works (see below for an example), then you could try having 2 command lines, one for TEST1 and one for TEST2.

Something like this (although may not be correct syntax as I only removed the "TEST2" part so you will have to check):

Expand|Select|Wrap|Line Numbers
  1. DoCmd.SendObject acReport, "TEST1", acFormatSNP,
  2. DoCmd.SendObject acReport, "TEST2", acFormatSNP,

Mar 18 '08 #2

P: 25

You have an option in Access ie Macro.
In Macro, you can select SendObject from Action Column, Below you will find the details ie

Object Type : Report
Object Name : Report 1
Output Format : Snapshot Format
To: Email ID
CC: Email ID
BCC: Email ID
Subject: Subject 1
Message Text : Message
Edit Message : Yes/No
Templete File:

Save the macro and run the macro

It will work.


Mar 19 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.