PC Review


Reply
Thread Tools Rate Thread

Condition for Send object

 
 
Jackie
Guest
Posts: n/a
 
      4th Nov 2009
I have some people specific queries that produce their people specific
report. I want to send these reports via email in a macro, if and only if
they have actually have results in the report. I have the macro setup and I
first say open the report, then send object and I am trying to set a
condition, but it isn't working. My condition was Reports![People
Specific]![Status] is not null. I choose that because there is always a
status if there is a record. Not sure what I am doing wrong, can anyone help.

Thanks in advance
 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      4th Nov 2009
Jackie,

No, that won't work. First of all, if there are no records, the value of
Status will not be Null... there will not be anything at all, it won't
exist, you can't evaluate a field if it's not there. Secondly, even if you
could, I am pretty sure that writing this into a macro condition would be
too late... retrieving a value from a field on a report needs the macro to
already have startted, which is too late to stop the macro running, you
know?

So therefore, you direct your attention to the table or the query that the
report is based on. Query probably easiest in this case. So, try this as
the Condition:
DCount("*","NameOfYourQuery")>0

--
Steve Schapel, Microsoft Access MVP


"Jackie" <(E-Mail Removed)> wrote in message
news:ABE6D999-7AE3-4898-9B69-(E-Mail Removed)...
> I have some people specific queries that produce their people specific
> report. I want to send these reports via email in a macro, if and only if
> they have actually have results in the report. I have the macro setup and
> I
> first say open the report, then send object and I am trying to set a
> condition, but it isn't working. My condition was Reports![People
> Specific]![Status] is not null. I choose that because there is always a
> status if there is a record. Not sure what I am doing wrong, can anyone
> help.
>
> Thanks in advance


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Method as it applies to format Condition object DTP Microsoft Excel Programming 3 7th Aug 2009 05:53 PM
Re: How to programmatically color an object on a condition fredg Microsoft Access Reports 0 9th Jan 2007 09:32 PM
Macro condition Select Object =?Utf-8?B?ZXllNTk=?= Microsoft Access Macros 1 28th Dec 2006 05:00 AM
how to use a condition in a macro to determine the current object. =?Utf-8?B?U2NvdHQ=?= Microsoft Access Macros 3 22nd Mar 2005 01:59 PM
Insert Object when condition met Eileen Microsoft Excel Misc 1 8th Feb 2004 11:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:29 AM.