I have a macro that imports data into a file called DownloadData, then runs a query to make sure that the records don't already exist in the Transactions table based on the date. Basically, I'm making sure that the dates in the DownloadData table are greater than the maximum transaction date in the Transactions table. Currently, the query will return no records if the data has not already been transferred. If records exist that are less than or equal to the maximum transaction date, then records get displayed. I was hoping to do a message box in my macro that would give an error message if records do get returned in that query, but return an information message if no records get returned.
Is there a way to tell the macro that no data was returned and conditionally display either the error message or the informational message?