i'm trying to email a snapshot of a report via the autoexec macro in access 2000. now let me provide you with a few important points so that you may have an easier time helping me out.
1. i am using the following code in my script:
"C:\Program Files\Microsoft Office\Office\MSACCESS.exe" "C:\Documents and Settings\database.mde"
2. granted that outlook is already running on my computer, the macro executes without flaw. the email is sent once to the required address.
3. when outlook is not open, however, the database prompts for a user profile. i'm assuming this has to do with access 2000 trying to open my default windows mail program (i may be wrong here). anyhow, the prompt screen comes up and the whole purpose of the macro is defeated, since i am to use it via windows task scheduler sometime during night hours.
4. in an attempt to overcome the above problem, i've made windows task scheduler open outlook just prior to executing the macro. this way, outlook is open and there is no prompt for a user profile. the report is emailed.
5. here is the real problem. when i schedule outlook to open at, say, 10:00 AM, and the database to open at 10:01 AM, something goes wrong and the report does not get emailed. during this trial procedure, i am logged out of my computer.
6. i know that windows task schedular actually opened the database because i see an Access.Lock.# file referring to my database file.
so why is it not emailing the report. help would be greatly appreciated. apologies in advance for the long post; i just want to present my problem clearly.
1. i am using the following code in my script:
"C:\Program Files\Microsoft Office\Office\MSACCESS.exe" "C:\Documents and Settings\database.mde"
2. granted that outlook is already running on my computer, the macro executes without flaw. the email is sent once to the required address.
3. when outlook is not open, however, the database prompts for a user profile. i'm assuming this has to do with access 2000 trying to open my default windows mail program (i may be wrong here). anyhow, the prompt screen comes up and the whole purpose of the macro is defeated, since i am to use it via windows task scheduler sometime during night hours.
4. in an attempt to overcome the above problem, i've made windows task scheduler open outlook just prior to executing the macro. this way, outlook is open and there is no prompt for a user profile. the report is emailed.
5. here is the real problem. when i schedule outlook to open at, say, 10:00 AM, and the database to open at 10:01 AM, something goes wrong and the report does not get emailed. during this trial procedure, i am logged out of my computer.
6. i know that windows task schedular actually opened the database because i see an Access.Lock.# file referring to my database file.
so why is it not emailing the report. help would be greatly appreciated. apologies in advance for the long post; i just want to present my problem clearly.