Run Module

D

DS

I have a split databse. From the Backend machine I want to run code from a
module on a time.
How can I do this?
Thanks
DS
 
J

John W. Vinson

I have a split databse. From the Backend machine I want to run code from a
module on a time.
How can I do this?
Thanks
DS

I'd suggest using Windows Scheduler to open a dedicated frontend database (on
the backend machine) once an hour, with the code in that frontend. As a rule
backend databases should contain only tables.

You can use the Startup macro in this database to do a RunCode action; or have
a startup form and run the code in its Open event.

John W. Vinson [MVP]
 
B

bootybox via AccessMonster.com

Thanks John, How do I use the windows scheduler? I've not used it before.
So the dedicated front end will be on the backend machine and will be opened
on the hour, then shut after the code is run?
Thanks
DS

Sorry about the double post. My computer crashed and I'm still trying to get
things back to normal.
 
J

John W. Vinson

Thanks John, How do I use the windows scheduler? I've not used it before.

Start... All Programs... Accessories... System Tools... Scheduled Tasks.
So the dedicated front end will be on the backend machine and will be opened
on the hour, then shut after the code is run?

The code or the startup macro should contain an Application.Quit to make it
exit.

John W. Vinson [MVP]
 
B

bootybox via AccessMonster.com

OK I have that part. Do I put this in the Run Command?
"C:\Documents and Settings\All Users.WINDOWS\Start Menu\Programs\Microsoft
Access.Sales.mdb"
This is only a front end database.
Thanks
DS
 
J

John W. Vinson

OK I have that part. Do I put this in the Run Command?
"C:\Documents and Settings\All Users.WINDOWS\Start Menu\Programs\Microsoft
Access.Sales.mdb"
This is only a front end database.
Thanks
DS

What is the actual *name* of the .mdb file? Sales?

What is the actual path to the .mdb file? Surely you don't have a folder named
All Users.WINDOWS?

I'd suggest *something like* - bearing in mind I can't see your computer!! -

"%programfiles%\Microsoft Office\Office11\msaccess.exe" "C:\Documents and
Settings\<some valid path>\Sales.mdb" /excl

You can also add a switch

/x macroname

if you want to execute a specific macro in the database, rather than relying
on the Autoexec macro.

John W. Vinson [MVP]
 
A

Albert D. Kallal

bootybox via AccessMonster.com said:
Thanks John, How do I use the windows scheduler? I've not used it before.
So the dedicated front end will be on the backend machine and will be
opened
on the hour, then shut after the code is run?
Thanks
DS

Sorry about the double post. My computer crashed and I'm still trying to
get
things back to normal.

I explain how to launch a ms-access application via the scheduler here:

http://www.members.shaw.ca/AlbertKallal/BatchJobs/Index.html

The above shows how to use the windows scheduler + a script to *run* a
particular piece of code in your application...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top