could be as simple as
Code:
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset ("qryNameOfYourQuery", dbOpenDynaset)
If rs.RecordCount > 0
'export, output, whatever
End If
Set rs = Nothing
This assumes you have a reference to DAO and you don't care about the count of records, just that there's at least one. From reading your post, I'm guessing you're OK with the rest, so I didn't put in any error checking.
Last edited by Micron; 02-07-2017 at 06:12 PM.
Reason: added info
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.