Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / February 2004

Tip: Looking for answers? Try searching our database.

SendObject Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
craigh - 24 Feb 2004 13:01 GMT
I am using the SendObject function send a report to
specific people. The e-mail addresses are stored in a a
field in the same table the report is based on.The table
is called Reversals Details.

I have the report detailed in then Object Name and in the
To field i have
":=[Reversals Details]![Team Leader]!"

I get the Outlook message box asking me to approve the
message. After clicking 'Yes' i get a message saying
'Unknown message recipient(s); the message was not sent.@

Any help would be greatly accepted.

Thanks!
JS - 24 Feb 2004 15:53 GMT
I don't believe you can put functions in macro fields.  
I've tried renaming tables based on the Now() function
(to backup tables based on date), but it never worked.

When I use the "Output to" command, I always find it best
to create a distribution list inside Outlook, and use
that distribution list in the "To" field.

>-----Original Message-----
>I am using the SendObject function send a report to
[quoted text clipped - 14 lines]
>Thanks!
>.
Steve Schapel - 24 Feb 2004 18:41 GMT
JS,

First of all, Craigh wasn't trying to use a function.

In any case, this is perfectly standard procedure.  As regards your
table renaming example, here is an example of the syntax to put in the
New Name argument of the Rename macro action...
="fred" & Format(Date(),"mmdd")

Signature

Steve Schapel, Microsoft Access MVP

> I don't believe you can put functions in macro fields.  
> I've tried renaming tables based on the Now() function
> (to backup tables based on date), but it never worked.
Steve Schapel - 24 Feb 2004 18:35 GMT
Craigh,

There is a : in the beginning of your expression, which is not correct.
 And there is a ! at the end of your expression, which is not correct.
 And [Reversals Details]![Team Leader] is meaning less to Access
anyway... this is incorrect syntax to refer to a field in a table, and
even if you could refer to a field in a table in this way, you couldn't
use it in an expression because how is Access supposed to know which
record to look in?

You can do the kind of thing you want if the email address is in the
current record on a form.  If the control on the form is called Team
Leader, and if it's the form that you are callig the macro from, it
should work to just put...
=[Team Leader]
... if the form is another form (has to be open at the time, of course),
you need the equivalent of...
=[Forms]![NameOfYourForm]![Team Leader]

Signature

Steve Schapel, Microsoft Access MVP

> I am using the SendObject function send a report to
> specific people. The e-mail addresses are stored in a a
[quoted text clipped - 12 lines]
>
> Thanks!
- 25 Feb 2004 13:08 GMT
Thanks Steve, that works perfectly now.

>-----Original Message-----
>Craigh,
[quoted text clipped - 33 lines]
>> Thanks!
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.