473,657 Members | 2,559 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 7287
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,568 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
2804
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 have success in running any query (basic SELECT, SELECT with conditions _other_ than LIKE, etc..) for some reason, when i execute the query below from the asp page, i get no results. the search.asp page just has a text box in a form that submits...
0
1717
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 events by location, by quarter of the year. Therefore, I have two flat files. This one shows what is allowed by quarter of the year:
5
3629
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 to direcly execute the query that I created in Access - if possible. Also, I would like to be able to add a parameter to that query. For example, if I'm in Access and put an unknown field in the query, I get prompted to enter that info when the...
8
7251
by: s_wadhwa | last post by:
SELECT DISTINCTROW "01C" AS dummy, Buildings.BuildingNumber, UCASE(Buildings.BuildingName) AS BuildingName, Buildings.MasterPlanCode, Buildings.UniformBuildingCode, Buildings.FunctionalCategoryCode, Buildings.OwnershipCode, Buildings.ConditionCode, Format$(,"0000000") AS dBasicGrossArea, Format$(,"0000000") AS dCoveredUnenclosedGrossArea, IIf(Month()>9,Month(),"0" & Month()) & Year() AS dDateOccupancy, Buildings.YearConstructed,...
4
2665
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 half a day (forenoon or afternoon), have the following computed field: SessionOff: ( And ) The query works fine when there's no criterion on SessionOff.
12
5273
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
1634
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 retrieved for this stored procedure' ... "The underlying enumerator did not support enumerating objects of type 'ProcedureParamater'". .Net does recognize the stored procedure i.e. it does appear in the drop-sdown list.
2
2301
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 ASP code and I can use it to read the query OK when "MyField" is not part of the query. If I add in MyField and then run my ASP code to try to read all the query fields, I get an error message on my web browser which says something to the effect...
4
2101
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
4398
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 field between them. The join field in both tables are indexed and I'm selecting 1 field from each table to lookup. The Access query is taking more than 60 second to retrieve 1 record and if I execute the same query within the Query Analyzer, it...
0
8392
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
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
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
8732
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...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
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();...
1
2726
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
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.