Reporting records whose subscription wil expire

K

Kathy Webster

I would like to have a query open and stay open if it returns any records,
but close if matching records is zero.

I created a query to report customers whose subscription is getting ready to
expire
[ExpirationDate] between Date() and Date()+30.

I put it in an autoexec macro, so that upon opening the database, it opens.
But if no one's subscription is ready to expire, I'd rather not see the
query.

TIA,
Kathy
 
S

Steve Schapel

Kathy,

Put the equivalent of this in the Condition of the macro...
DCount("*","YourQuery")>0
 
K

Kathy Webster

Perfect! Thank you!!!

Steve Schapel said:
Kathy,

Put the equivalent of this in the Condition of the macro...
DCount("*","YourQuery")>0

--
Steve Schapel, Microsoft Access MVP

Kathy said:
I would like to have a query open and stay open if it returns any
records, but close if matching records is zero.

I created a query to report customers whose subscription is getting ready
to expire
[ExpirationDate] between Date() and Date()+30.

I put it in an autoexec macro, so that upon opening the database, it
opens.
But if no one's subscription is ready to expire, I'd rather not see the
query.

TIA,
Kathy
 
Top