[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Running a subroutine automatically

Posted on 2007-11-26
3
Medium Priority
?
699 Views
Last Modified: 2013-11-27
I am using MS Access 2003.

I have a subroutine that will import a .csv file and append it to a master table. I would like this subroutine to run at a set time each morning with no intervention.

Is this possible?
0
Comment
Question by:TylerDerden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:JimFive
ID: 20352617
Create a macro that has two steps:
1.  run your code and
2. exit the database.

In the "control panel" Add a "Scheduled Task"

The Task should be a command line that looks something like:

"C:\Program Files\Microsoft Office\MSACCESS.EXE" "Path\to\access.mdb file" /x MacroName

--
JimFive
0
 

Author Comment

by:TylerDerden
ID: 20353567
Thnx JimFive. I think we may be close.

I'm running on Windows XP Enterprise.
When I get to the schedule a task dialog box the fields to enter are:
Run:
Start in:

For the run option I clicked browse and selected to access database. However, I do not see a place where I can specify with vba module I would like to run.
Also, I do not know what to enter in for start in.

I googled it but the ms site wasn't very helpful.

Any ideas?
0
 
LVL 15

Accepted Solution

by:
JimFive earned 750 total points
ID: 20354889
In the run box, don't select the access database.  You need to have the full command line:

"C:\Program Files\Microsoft Office\MSACCESS.EXE" "Path\to\access.mdb file" /x MacroName


Your MSACCESS.EXE may be in a slightly different location.  your Macro Name goes where I typed MacroName and your access database full path goes where I typed "Path\to\access.mdb"

For start in use the directory where the access.mdb is located.

--
JimFive
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question