G
Gavaruus
Hi all,
my task is to create a report as pdf that is automatically mailed
every day to several people.
So the following steps are necessary:
1) Create a scheduled task in the control panel that calls... --->
OK
2) a .bat file with a line like this: "C:\Program Files\Microsoft
Office\Office12\msaccess.exe" mydb.mdb /X SendDailyReport --->
OK
3) The macro SendDailyReport calls with the Action RunCode a Sub in a
form that is opened on startup ---> failed, because I am not so
familiar with VBA. How does the syntax look like to call a sub from a
specific form?
4) Running some queries and code. ---> partly failed
Problems with this code:
timeAndDay = timeTo + dayReport
Whereas:
timeTo has type Medium Time
dayReport type Short Date
timeAndDay is type General Date
This code works fine if I call it on the event "Before Update", but
when I call it in my Sub, then I get a "data type mismatch". I don't
understand the logic.
5) A mail is of the report is sent using DoCmd.SendObject ---->
partly failed, because I get the Outlook pop up "
A program is trying to send an e-mail message on your behalf. If this
is unexpected, click Deny and verify your antivirus software is up-to-
date.". Since I do not use exchange server, it requires me to write a
COM add-in OR using the CDO library with some additional code to work
around the problem. ( From: http://support.microsoft.com/default.aspx?scid=kb;en-us;263084
)
Or are there any other suggestions?
5) Quit MS Access using macro ----> OK
So if you have any suggestions for step 3,4 and 5, it would help me a
lot!
Thanks in advance,
Gavaruus
my task is to create a report as pdf that is automatically mailed
every day to several people.
So the following steps are necessary:
1) Create a scheduled task in the control panel that calls... --->
OK
2) a .bat file with a line like this: "C:\Program Files\Microsoft
Office\Office12\msaccess.exe" mydb.mdb /X SendDailyReport --->
OK
3) The macro SendDailyReport calls with the Action RunCode a Sub in a
form that is opened on startup ---> failed, because I am not so
familiar with VBA. How does the syntax look like to call a sub from a
specific form?
4) Running some queries and code. ---> partly failed
Problems with this code:
timeAndDay = timeTo + dayReport
Whereas:
timeTo has type Medium Time
dayReport type Short Date
timeAndDay is type General Date
This code works fine if I call it on the event "Before Update", but
when I call it in my Sub, then I get a "data type mismatch". I don't
understand the logic.
5) A mail is of the report is sent using DoCmd.SendObject ---->
partly failed, because I get the Outlook pop up "
A program is trying to send an e-mail message on your behalf. If this
is unexpected, click Deny and verify your antivirus software is up-to-
date.". Since I do not use exchange server, it requires me to write a
COM add-in OR using the CDO library with some additional code to work
around the problem. ( From: http://support.microsoft.com/default.aspx?scid=kb;en-us;263084
)
Or are there any other suggestions?
5) Quit MS Access using macro ----> OK
So if you have any suggestions for step 3,4 and 5, it would help me a
lot!
Thanks in advance,
Gavaruus