PHV
Thanks for the code. It works. But here's the weird thing. To reiterate, this is a VBAccess app and I added the email code to an existing module. This module queries a database and populates the results in an excel file -- which I wanted to be taken as an email attachment and then sent automatically. The weird thing is when I run the macro which calls the function in which the email code resides, the email and its attachment are sent. But when I run the program from the Macro Scheduler, which causes the app to run at a specific time daily, it completely bypasses the email code while it does the other tasks specified in the program. No errors are being spit out by Access or VB. Don't understand what might be the issue here. Do you have any insight?
Thanks.
J