Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto email the report

Status
Not open for further replies.

fmt

Programmer
Aug 5, 2005
53
US
Hello,
I am using Access2000 and we generate report every morning and email it to different people. Is there anyway to automate this process.
Run the report at scheduled time and email to recepients?

Thanks
 
There are tons of posts about this topic and it depends on your operating system and email program. The simplest is to use SendObject and hard-code in the list of recipients; more sophisticated is to keep a list of recipients in a table, loop thru it with a recordset object, and create a TO: list. This is advantageous in that users can alter the list without knowing programming. Try looking up SendObject. You can use a combination of an Autoexec macro, SendObject and the Windows Scheduler to open your db (if you use Windows OS), at which point the Autoexec macro runs and sends out the email. An issue if you have Outlook may be that it will stop with a message alterting you that another entity (MS Access) is trying to send an email on your behalf and verifying if you are ok with this. Again, search existing posts for solutions for your particular circumstances.

Hope this helps--g

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Thanks a lot... will try this..
 
Hi

I just went thru this last week. I have a job that runs nitely out of the scheduler and it emails at the end.

1. create a function in a module file
2. create a macro that calls the function
3. your scheduler will need to load access and run the function.... note the enclosed command.
You will need /X for the macro and in my case Nightly represents the function.

"C:\Program Files\Microsoft Office\Office11\msaccess.exe" "C:\folder\xxx.mdb" /Excl /X Nightly
 
Following on from Jeep2001's post, once you've created your function and macro, use something like the Handy Access Launcher (HAL) to schedule the macro runs for various times of your choice, including every day, every weekday, every x hours, once a month, etc. It can also schedule database admin tasks like compact/repair. It can be found at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top