I am using vba to build a query from a simple select statement and am exporting the query results to a .csv file using Cmd.TransferSpreadsheet. There have been a few instances where a blank spreadsheet is exported, and I would like to combat that somehow. Is there a way to check the row count from the query before exporting to .csv, and if the rowcount = 0 then display a message on screen to the user that the query returned 0 results.