OT Question about Access - Is this possible?

Started by
4 comments, last by mrmrcoleman 17 years, 7 months ago
Hello, I realise this isn't exactly programming but I thought you guys would probably know the answer to my question. Basically I would like to maintain a list of records in a table in Access. Each day this table should be automatically checked, and based on this checking, emails can be sent to various addresses contained within the records. I am pretty sure that I could set-up a macro to check the table and send the emails (assuming this functionality is available in VBA), but I am not sure about the automatic checking at a given time each day. Does anybody know if this is achievable with Access and perhaps some VBA? The reason I ask is because I am considering doing this as a favour for somebody in another department, and if it is going to be a lot of work, I don't have time so I will have to say no. Thanks in advance for any help with this. Mark
Advertisement
Quote:I am pretty sure that I could set-up a macro to check the table and send the emails (assuming this functionality is available in VBA), but I am not sure about the automatic checking at a given time each day.

Your suspicions are correct; you can't do what you describe in Access without the aid of an external process. The macros cannot run if the file is not open. The usual way is to set a Scheduled Task that runs at the desired time.
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
Many thanks.
Another idea...

Is it possible for me to have Access automatically run on start-up, and provide it with some command line values to load a database.

Surely if I can get that working I can get a macro to automatically run when the DB is opened, right?

Mark
Quote:Original post by mrmrcoleman
Another idea...

Is it possible for me to have Access automatically run on start-up, and provide it with some command line values to load a database.

Surely if I can get that working I can get a macro to automatically run when the DB is opened, right?

Mark

That's certainly possible, but it's very fragile. The easiest and least secure way to do it is to use a shortcut to the Access executable with a command-line parameter corresponding to the file you'd like to load. For instance, you might set the shortcut to "C:\Programs\Access.exe" "Q:\Files\myFragileCompanyDatabase.mdb". Then you'd place this shortcut in the All Users\Startup folder.

If you want more information, try asking in the Microsoft newsgroups. There are some very knowledgeable people there, and the Office MVPs are more than willing to assist you.

hope that helps,
- k2"Choose a job you love, and you'll never have to work a day in your life." — Confucius"Logic will get you from A to B. Imagination will get you everywhere." — Albert Einstein"Money is the most egalitarian force in society. It confers power on whoever holds it." — Roger Starr{General Programming Forum FAQ} | {Blog/Journal} | {[email=kkaitan at gmail dot com]e-mail me[/email]} | {excellent webhosting}
Thanks again K ^ 2

This topic is closed to new replies.

Advertisement