473,406 Members | 2,356 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,406 software developers and data experts.

cron or schedule

i'm also not newbie to Access but i'm not programmer. I have a need to
automate some task in Access. Every monday which is the first day of
the week, I have to send a MS Excel file containing data which
generated by MS Access. In my MS Access, I queries and filter a lot of
data from Oracle database which I connect using ODBC.

In this query, there is one perimeter need to fill up. The parameter
is date. It's a range of date. Every Monday I have to fill this
parameter from date of last Monday to last sunday. This is weekly data
need to be emailed out to my user.

Is there any mechanism to automate this task?
Mar 10 '08 #1
2 7679
DFS
ami'n wrote:
i'm also not newbie to Access but i'm not programmer. I have a need to
automate some task in Access. Every monday which is the first day of
the week, I have to send a MS Excel file containing data which
generated by MS Access. In my MS Access, I queries and filter a lot of
data from Oracle database which I connect using ODBC.

In this query, there is one perimeter need to fill up. The parameter
is date. It's a range of date. Every Monday I have to fill this
parameter from date of last Monday to last sunday. This is weekly data
need to be emailed out to my user.

Is there any mechanism to automate this task?
Start | Settings | Control Panel | Scheduled Tasks

Create a standalone Access file (.mdb or .mde)

Add a macro named 'autoexec' - it will execute when the Scheduled Task opens
the file
The autoexec macro will contain at least one TransferSpreadsheet statement
to output your data to an Excel sheet, and a Quit command to close the
system altogether.

The TransferSpreadsheet statement will take as an input your query with the
date parameters:

WHERE DatePeriod Between (Date() - 1) and (Date() - 7)

Note: the macro builder for TransferSpreadsheet says 'Table Name' but you
can enter a SELECT query.

Schedule this task to run anytime Monday, after 12:00:00am.

Mar 10 '08 #2
DFS
DFS wrote:
ami'n wrote:
>i'm also not newbie to Access but i'm not programmer. I have a need
to automate some task in Access. Every monday which is the first day
of the week, I have to send a MS Excel file containing data which
generated by MS Access. In my MS Access, I queries and filter a lot
of data from Oracle database which I connect using ODBC.

In this query, there is one perimeter need to fill up. The parameter
is date. It's a range of date. Every Monday I have to fill this
parameter from date of last Monday to last sunday. This is weekly
data need to be emailed out to my user.

Is there any mechanism to automate this task?

Start | Settings | Control Panel | Scheduled Tasks

Create a standalone Access file (.mdb or .mde)

Add a macro named 'autoexec' - it will execute when the Scheduled
Task opens the file
The autoexec macro will contain at least one TransferSpreadsheet
statement to output your data to an Excel sheet, and a Quit command
to close the system altogether.

The TransferSpreadsheet statement will take as an input your query
with the date parameters:

WHERE DatePeriod Between (Date() - 1) and (Date() - 7)

Note: the macro builder for TransferSpreadsheet says 'Table Name' but
you can enter a SELECT query.

Schedule this task to run anytime Monday, after 12:00:00am.
btw, the Run line in your Scheduled Task will need to be something like this

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"D:\MyAccessFile.mdb"
Mar 10 '08 #3

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

Similar topics

4
by: Leigh Riley | last post by:
Hi there, Can anyone tell if there's a solution to this for a Windows environment? If this was running under Linux, it would be a problem, but... I have a php script that when run, examines a...
29
by: deko | last post by:
Is there a way to get my script to run on regularly scheduled intervals without using cron? My hosting provider sucks... cannot use cron... I was thinking perhaps I could create a file every hour...
0
by: steve | last post by:
I've seen questions about scheduling ASP scripts posted in this group many times so hopefully this will be useful information to a few people. I just wanted to let you all know that our script...
6
by: Andrew Banks | last post by:
When I've developed PHP sites before we've had a server facility called a CRON job to set a certain page to run at pre-defined periods (schedule it) Is there an equvalent for ASP.NET/IIS? I've...
6
by: giangiammy | last post by:
I don't know if this is possible, but I need to accomplish an action at a given hour (what cron does): is it possible to do something like this having a web hosting service with php support? ...
1
by: sainath reddy | last post by:
Hi, Can you help me in how to proceed for scheduling a cron job by looking into the time in the oracle table. Say for ex: In a table it is mentioned that abc.dat file has to be extracted at 3...
1
by: Karthik Gurusamy | last post by:
Hi, I'm working on a cron like functionality for my application. The outer loops runs continuously waking every x seconds (say x=180, 300, ..). It needs to know what events in cron has expired...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
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
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...
0
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,...

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.