VBA to parse date from file name
Posted on 2013-10-25
I want to prevent an ACCESS 2003 module or macro from sending our reports IF I do not see a file in a network folder dated with the current date in the name. For example every day a file is sent to a folder named.... file_[current date]. A scheduled task picks up the file, imports into ACCESS 2003 and sends report out via OUTLOOK. In the module I need to write an IF ELSE statement. IF the file with the current date is NOT in the folder the module should stop and/or send a message to the developer to say the file is not there. ELSE IF the file with the current date IS in the network folder I want the module to import the data and generate the reports.
Thoughts? THANKS ALL