You won't be able to achieve this result using a macro. It's time to start
learning how to program using VBA (Visual Basic for Applications) code. Here
is a general outline of the steps required:
1.) Declare database and recordset variables
2.) Set database variable to currentdb, for example:
3.) Set recordset variable to source query
4.) Use an IF...THEN test to test for recordcount
ie. If rs.recordcount > 0 Then
5.) Close the recordset and database variables and then set each = nothing
6.) Don't forget to include error handling code.
If you are interested in pursuing this idea, then post back and I can
provide a more complete sample. If, on the other hand, you are not willing to
venture beyond macros, then you'll have to live with the current situation.
If my answer has helped you, please answer yes to the question that reads
"Did this post answer the question?" at the bottom of the message thread.
I've created a send object macro that runs everytime i open the main form in
my database. THis macro is setup to email me a query. WHat i want is for it
to only email me when there are records in the query. The way i have it set
up now, it emails me whether or not there are records in the query.
thanks for looking!