I have created a macro which emails the results of a query to myself when I open the access database.
- However, I only want it to do this if the query finds any records, otherwise it sends me a blank document half the time.
- I have tried using the 'If' Program Flow so it either sends the email, or just makes a popup to say no results found. But I don't know how to instruct Access to know whether the Query found any records or not, so you see the missing piece of the puzzle.
So the issue is in the If function
, so far all I have is:
If [TheQuery]![QuerysUniqueID]="" then...
- but this doesn't work. I need it to say
'if the query finds no records...'
Please note I'm an access noobie using the macro creator not VBA (I have a vague understanding of it...), so use simple words please
Thanks in advance,