here's how to check for the existence of any type of object in the db container
http://access.mvps.org/access/queries/qry0002.htm
You could create a recordset based on a sql statement looking for your table name and if the record count is zero, the table doesn't exist. To make this reusable, you might create a function that accepts the sql statement, runs it, checks the count and returns true if > 0 else returns false.
If there are no new csv files - end
This I can't advise on since I have no idea how you know what's new, but to not execute additional code, you have a line such as Exit Sub or Exit Function at that point - likely within an IF block, like
If not something Then
Exit Sub
Else
do stuff
End If
P.S. for larger blocks of code like yours, please use code tags (indentation would be nice too!)
Last edited by Micron; 02-20-2017 at 11:53 AM.
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.