Condition for Send object

J

Jackie

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
 
S

Steve Schapel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top