473,396 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Running Access Automatically

Is there a way to set up access to open and run a query in a particular
database at a particular time each day? This would be run from a
Windows 2000 desktop.

Dec 28 '06 #1
2 4716
ms*****@gmail.com wrote:
Is there a way to set up access to open and run a query in a
particular database at a particular time each day? This would be run
from a Windows 2000 desktop.
You can either...

Use the Load or Open event of a form set to be displayed at startup to run the
query and then close the file.

....or...

Use a macro named AutoExec that will also run automatically when the file is
opened.

....or...

Use the /Macro command line argument to open the file which allows you to
specify a macro that will automatically run when the file is opened.

You then use Windows Scheduled Tasks to actually launch the file according to
the desired schedule. In a corporate network environment Scheduled Tasks
normally run under the System account and that account might not have adequate
permissions to make the file work properly. In that case you have to configure
the task to run under your account and supply a password.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Dec 28 '06 #2
Rick Brandt wrote:
ms*****@gmail.com wrote:
>>Is there a way to set up access to open and run a query in a
particular database at a particular time each day? This would be run
from a Windows 2000 desktop.


You can either...

Use the Load or Open event of a form set to be displayed at startup to run the
query and then close the file.

...or...

Use a macro named AutoExec that will also run automatically when the file is
opened.

...or...

Use the /Macro command line argument to open the file which allows you to
specify a macro that will automatically run when the file is opened.

You then use Windows Scheduled Tasks to actually launch the file according to
the desired schedule. In a corporate network environment Scheduled Tasks
normally run under the System account and that account might not have adequate
permissions to make the file work properly. In that case you have to configure
the task to run under your account and supply a password.
I sucessfully use the third method Rick suggest; however, I seem to recall it works using
the /x parameter to call a named macro (instead of /Macro) but that may be a version issue
(I'm using A2K).

so

"c:\Program Files\Microsoft Office\Office\msaccess.exe" /x myMacro

starts my Access installation and runs the "myMacro" macro on startup. That macro opens a
report, prints it and exits Access. Been running for years with no problem.

And Rick's comments on the System account are important. I schedule a report to be printed
each morning before personnel arrive for work. But, to print in a networked environment
requires an account with more privilege than "System". But XP lets you scheduled tasks to
run as any user where you can supply a valid password (one that can access a printer in my
case).

If you think about it a bit you wouldn't want just any user to schedule a task that
(basically) runs with Admin privileges (as early Win-95, Win98 everyone-runs-as-root OSs
did) but instead control access to this important activity.

Good luck...

--
'---------------
'John Mishefske
'---------------
Dec 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think...
2
by: fritz | last post by:
Trying to get at mysql. I installed mysql on two separate machines and am unable to access either one. On the first I couldn't put it on C: because that was a limited DOS drive. So here is the...
8
by: dixie | last post by:
I want to run an event when I press the Ctl key simultaneously with the K key. How do I achieve this in VBA? dixie
4
by: Pachydermitis | last post by:
Hi, I am distributing an access database to systems that all have office installed on them. Is there any way to force this database to run in runtime mode - other than the /runtime switch? Are...
13
by: David Lozzi | last post by:
Howdy My following script is not processing at all! <script runat="server"> Sub Page_Load(sender as Object, e as EventArgs) lblWelcome.text = "hello" End Sub </script>
5
by: Dixie | last post by:
My application runs some temporary file clean up code as an onClick event when users click the exit button. My problem is that some users don't exit properly and simply click the cross on the top...
25
by: artromanov | last post by:
Hello everyone. I am somewhat new to access and this forum. Hopefully it will be a great and helpful experience. My problem is this. I have a database (about 65,000 records). I get a run from...
3
by: wizofaus | last post by:
I've now created the same setup on four different machines, where I'm changing the processModel section machine.config so that ASP.NET (1.1) runs as SYSTEM, to give it permission to do various...
0
by: jcunningham | last post by:
Hello. I am running Crystal Reports (CR) from within an Access DB. I need to be able to have CR point to the Access DB it resides in automatically. That is, the CR's reside in the database I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.