473,503 Members | 6,587 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can i schedule a access query

1 New Member
Hi all ,
i run a query on daily basis manually using ms access database.i want to run this query automatically on daily basis on a perticular time.can anybody suggest me something.
what i tried ,i made a shortcut and ttried to schedule the query...but it didnt work out .thanks in advance for your suggestion
Dec 9 '11 #1
4 7281
sierra7
446 Recognized Expert Contributor
Hi
I have never done this but would start by creating a small Access application, that obviously must have links to the backend data, and have a startup form which then called the query from its On_Open event.

I don't know whether you are running an UPDATE query or a MAKE-TABLE query (there would be no point running a select query if there was no-one to view the screen !) but I suspect the form would also need a timer to close the application.

I would look to run this from Windows Scheduler but, as I said above, I have never tried this.

Good Luck
S7
Dec 9 '11 #2
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
Access by itself only runs when its open. So you cannot using solely access schedule any events. As Sierra said, if you use another program to open the database, it might be possible to make a form that opens automatically (hidden possibly) executes the query, and closes it self when done.

If you for some reasons always have access open, you can use a form with a timer, to test whether its time to run your query.
Dec 9 '11 #3
sierra7
446 Recognized Expert Contributor
Hi again,
I can now confirm that the method proposed in my last post does actually work.

In an existing project I created a form that opens a report in the On_Load event (Also works On_Open) and has a Timer set to 100 milliseconds and a DoCmd.Quit in the Timer Event.

I closed the project and went to Windows Task Scheduler and created a new task (to run once only!). All I needed to do was specify the start time to 2 minutes hence, then path to the .mdb file (Did NOT need to pass the path to msaccess.exe!) Sit back and wait.

Access oppened, the form opened for an instant then closed Access, while the printer was producing paper!

S7
Dec 9 '11 #4
NeoPa
32,557 Recognized Expert Moderator MVP
This link (Invoking a Database From the Command Line) gives you full details of how to schedule your tasks in an Access project.
Dec 9 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2795
by: david liu | last post by:
access 2000 query: here's what i want to do. from an asp page, perform a search on a table in access. i have used sql code in the asp page itself, but i'd rather execute a query in access. i...
0
1712
by: argniw | last post by:
I have a schedule of annual events that need to occur in different locations throughout the year. Each event has a due date associated with it. I also have an optimal schedule that consolidates...
5
3622
by: Art | last post by:
Hi, Can anyone point me to an example of how I would execute a query I've created in an Access DB. I've copied the SQL down to my VB.net application and that works fine, but it's ugly. I'd like...
8
7246
by: s_wadhwa | last post by:
SELECT DISTINCTROW "01C" AS dummy, Buildings.BuildingNumber, UCASE(Buildings.BuildingName) AS BuildingName, Buildings.MasterPlanCode, Buildings.UniformBuildingCode,...
4
2644
by: ShastriX | last post by:
Getting a weird error while trying out a query from Access 2003 on a SQL Server 2005 table. Want to compute the amount of leave taken by an emp during the year. Since an emp might be off for...
12
5246
by: zwasdl | last post by:
Hi, I'm using MS Access to query against Oracle DB via ODBC. Is it possible to use HINT in Access? Thanks, Wei
3
1619
by: =?Utf-8?B?bXNjZXJ0aWZpZWQ=?= | last post by:
Has anyone successfully used an Access query from .NET? I am trying to do this and am getting a weird error. .NET calls queries 'stored procedures'. The error I am getting says "Schema could not be...
2
2292
by: k-man | last post by:
Hi: I have an MS Access query for a table called MyTable. One of my fields in the query is a custom field that looks like "MyField: = MyFunction(ID)" where ID is a field in MyTable. I have...
4
2092
by: ARGroup | last post by:
Hi all Is there any method to schedule Access queries to run regularly?If yes pls mention how it is being done?
6
4371
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
0
7193
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,...
0
7264
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
7316
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...
1
6975
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
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
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 ...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.