Solved

Scheduling Access

Posted on 2011-03-15
14
324 Views
Last Modified: 2012-05-11
Hi,

Im looking to schedule an access form to run automatically each morning. How can i achieve this?

Thanks
Seamus
0
Comment
Question by:Seamus2626
[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
  • 6
  • 4
  • 4
14 Comments
 
LVL 15

Accepted Solution

by:
Simon Ball earned 250 total points
ID: 35136418
make the form the default startup form for a new copy of the db.

make it do some work and then close access

use windows scheduled tasks to open the DB.

if that gives you any grief, make a batch file which opens the db.. and call that from the scheduled task

batch file:

start "" "d:\mydatabase.mdb"
exit
0
 

Author Comment

by:Seamus2626
ID: 35136469
"make it do some work and then close access"


Thanks Sudonim, what do you mean by the above, i have set the form as the default on open and used the scehduler to open Access, how can i get it to run the form though?

Thanks
Seamus
0
 
LVL 15

Expert Comment

by:Simon Ball
ID: 35136476
1) make a copy of your db, and open the copy

2) make the form the default in (assuming Access 2007) by going to the microsoft button, access options, current db, and select Display form and chose the form you want

3) close and re-open the db

4) set up the form to do the work you want, and if necessary - to close the access application when done.. ( you can do this with the button wizard thingy, close database.  DoCmd.Quit)

5)  Test that works ok... then go to (assuming win xp) start, settings, control panel, scheduled tasks, add task

and browse to your new database.

set up the schedule... and run the task as a test.

0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 15

Expert Comment

by:Simon Ball
ID: 35136481
by opening the form it is running the form...

is there a button on the form that needs to be pressed?  if so, you'll have to add the button press event into the forms onload event
0
 

Author Comment

by:Seamus2626
ID: 35137137
Heyu Sudonim, been away from my desk. I sceduled Access to open and the macro to autoexec, the problem is the warning messages, even when the MDB opens, i need to press

"Open"

Then i get all the other warning buttons

How can i supress these?

Thanks
Seamus
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35139558
Can you provide a bit more info on these Mysterious "other warning buttons"?
(Possibly providing screenshots)

Try opening the DB and specifying the macro to be opened at the same time..
Create a shortcut to open the DB, with something like this as the Target:
"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "c:\YourFolder\YourDatabase.mdb" /x YourMacro

Obviously, you would substitute your specific path to your Access executable...

0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 35139613
FWIW to suppress most *security* messages, the DB must be in a trusted location.

Office Button-->Access Options-->Trust Center-->Trust Center Settings-->Trusted Locations

0
 

Author Comment

by:Seamus2626
ID: 35139617
Thats what i am doing boag2000, but when the db opens, who clicks "Open". Also, the Macro is executing queries that have warning messages such as "You are about to paste 30 rows into a table"

Again. with no user, how can i surpress these messages, can i do that within the queries?

Thanks
Seamus
0
 

Author Comment

by:Seamus2626
ID: 35139814
Okay, ive put into the autoexec macro to ignore warnings, however, im still in the same place regarding the "Open" Button. So when the sceduler opens Access, it needs someone to press "open"

I couldnt find your path

Office Button-->Access Options-->Trust Center-->Trust Center Settings-->Trusted Locations

I use 2003

Thanks
Seamus
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35140285
Again, can you post the screenshot of this "Open" message?
What version of Access Please?
Doers this message appear on All database, For all users, on all computers, ...etc
0
 

Author Comment

by:Seamus2626
ID: 35140371
2003

Its the main warning when you open access, the security warning......
attached

Thanks
Seamus
Doc2.doc
0
 

Author Closing Comment

by:Seamus2626
ID: 35140706
Got it sorted, turned the security to low
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35141088
Great.
0
 
LVL 15

Expert Comment

by:Simon Ball
ID: 35142786
you can supress the append and delete messages using

docmd.setwarnings false


turn them back on at the end of the script / button code etc with
docmd.setwarnings true
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

623 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