Automatic Procedure - Email

D

DEI

Is there anyway to program an automatic event in Access, i.e. update query
that runs every night at 10:00 am, etc.?

And, is there any way to program access to perform automation event,
specifically send an email, on its own when not being accessed by anyone?

I would like the database to send a notification email every morning at 5am.

Thanks in advance,

DEI
 
S

smartin

DEI said:
Is there anyway to program an automatic event in Access, i.e. update query
that runs every night at 10:00 am, etc.?

And, is there any way to program access to perform automation event,
specifically send an email, on its own when not being accessed by anyone?

I would like the database to send a notification email every morning at 5am.

Thanks in advance,

DEI

In theory, yes, but there are a few hurdles.

Access must be running at 5AM, of course. Then you need some sort of
trigger to fire a SendObject method, at 5AM. These are easy enough using
Windows scheduler (maybe, and if needed) and some kind of Timer event in
your Access application. Lastly, your network environment must allow the
automated email to go unattended.

In my case, I can't do this sort of stuff because (a) I get logged out
after three hours of inactivity, and (b) our Outlook server prohibits
unattended emails.
 
D

dch3

As the other person stated - NO. But you have some options.

1) You can entirely set things up so that a query automatically runs if it
hasn't already been run. It comes down to creating a table where you capture
the last date/time that an event ran. Then in your Startup function, you
check the record for the specific query. If it has not run on today's date,
you execute it. Finally, you run an Update on the table to show the query as
having been run. This assumes of course that you have a Startup function and
preferably a splash screen on which you can give your users a message
indicating that queries are running and to please standby.

2) I'm not the Windows Server guru, but I'm fairly certain that you can
create a task on the server to open the database. I believe that there is a
command line switch that will cause a specific macro or procedure to run. If
not, I do know that theres a user parameter switch that you can use to cause
you're startup code to recognize that its being opened by the server. Then
its a matter of branching out to do what needs to be done and then quit
Access.

See /x and /cmd at http://www.vb123.com/workbench/help/commandline.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top