What about setting a form to run the query, and add a count feature in the form as an unbound box, and if the record count is 0 then cancel the event
Create a form based on the query, and add a textbox that will count based on a field that will always have something in like an ID field.
Add an if statement to a command button something like this:
docmd.openquery "Query Name"
IF txtcount.value=0 then
exit sub
else
docmd.transferspreadsheet etc
end if