473,748 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4737
ms*****@gmail.c om 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.c om 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\m saccess.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
2766
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 this would be simple enough if the ASP didn't have any user input, but it does.
2
2238
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 my.ini file for this: #This File was made using the WinMySQLAdmin 1.4 Tool #7/5/2004 10:56:37 AM #Uncomment or Add only the keys that you know how works. #Read the MySQL Manual for instructions
8
2257
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
2867
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 there any security advantages to doing this? Thanks P.S. How do I keep my email address from showing up for all the junkmailers?
13
4593
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
2025
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 right corner of the window it is running in. Can I run the code somehow when that happens? If so, how? TIA dixie
25
3863
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 another party every month in a text format (notepad) which I import into my database and make a comparison between the previous months and current months tables (some fields) by running a query. What I am trying to do is create a nice form that will ...
3
6031
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 things like access the Task Scheduler etc. Three of the machines are using IIS 5.1 and work fine. The 4th machine is using IIS 6.0, and also has ASP.NET 2.0 installed (but I've made sure that the IIS application in question is using ASP.NET 1.1). ...
0
1222
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 need them to point to dynamically. As it works now, I have to change the location of the datasource within the CR each time change the location of the Access database or I have to store the DB in the same place for the CR to work. I'm sure there's...
0
8994
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9555
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4878
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.