I have a Microsoft Access database that is scheduled to run at 8:05am everyday. It uses an AutoExec macro, and the first step of the macro is to SetWarnings = "No". The 2nd step is to import a file. The File Name that it imports is ="E:\Brad\Transfer\DDP Order Confirmations\RecOrd" & Format(Date(),"mmddyy") & "0801". This file is created off of orders in our database, and if no orders have been taken by 8:05am, this file is not created, and will not exist for Access to import.
The problem we encounter happens when the file doesn't exist. When the file does not exist, we get the following error: "The Microsoft Access database engine could not find the object 'E:\Brad\Transfer\DDP Order Confirmations\RecOrd0527090801.XLS'. Make sure the object exists and that you spell its name and the path name correctly. (Error 3011)" We would like for the Access database to disregard the error, and just close, or move on to the next step of the query if this error is encountered, but it gets hung instead. We thought the SetWarnings action would resolve this, but it doesn't.
What options do we have here to bypass this error when it is encountered? We do not want the Access database to be hung indefinitely when it occurs.