Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / June 2007

Tip: Looking for answers? Try searching our database.

Run From Command Line Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff C - 22 May 2007 18:39 GMT
The following events are tied to an OnClick Event of a command button.

DoCmd.SetWarnings False

Set oShell = CreateObject("WScript.Shell")
oShell.Run """C:\Program Files\Mobius\DocuAnalyzer\Program\Autoscrp.exe""
""s:\Analyzer\eMAR.bat""", 0, True

DoCmd.TransferText acImportFixed, "rpt11Import", "ScannedTBL", "s:\Rpt11.txt"
DoCmd.OpenQuery "qry_Clean1"
DoCmd.OpenQuery "qry_Clean2SpacesTime"
DoCmd.OpenQuery "qry_Clean3Add0"
DoCmd.OpenQuery "qry_Clean4MakeFourDigit"
DoCmd.OpenQuery "qry_Clean5Add:"
DoCmd.OpenQuery "qry_Clean6UpdateMidnight"
DoCmd.OpenQuery "qry_Clean7CombineDateTime"
DoCmd.OpenQuery "qry_Clean8AppendNewData"
DoCmd.OpenQuery "qry_Clean9DeleteTempImport"
DoCmd.DeleteObject acTable, "Rpt11_ImportErrors"

DoCmd.SetWarnings True

I want to schedule these to run at a certain time every night using the Task
scheduler and I don't know how to go about it.  I think there must be an
easier way than converting allthese VB commands to WSH.

What would be the best way to do this?  Thank you
Signature

Jeff C
Live Well .. Be Happy In All You Do

John W. Vinson - 23 May 2007 16:33 GMT
>I want to schedule these to run at a certain time every night using the Task
>scheduler and I don't know how to go about it.  I think there must be an
>easier way than converting allthese VB commands to WSH.

Create a Macro named, say, RunJob. In the Scheduler launch your database with
a command line switch:

"C:\yadayada\msaccess.exe" "E:\somepath\my.mdb" /x RunJob

            John W. Vinson [MVP]
Long Live Aaron Kempf - 25 Jun 2007 05:00 GMT
Warning!

John Vinson is a known troll; he does nothing but run around promoting MDB

I would reccomend finding a credible SQL Server developer / dba in order to
suit your needs.

> On Tue, 22 May 2007 10:39:00 -0700, Jeff C
> <JeffC@discussions.microsoft.com>
[quoted text clipped - 12 lines]
>
>             John W. Vinson [MVP]
Tom Wickerqueer - 25 Jun 2007 09:51 GMT
just use SQL Server and SQL Agent

this funcitonality is built in to a freeware version of SQL Server, why
would you do ANYTHING from the command line?

> On Tue, 22 May 2007 10:39:00 -0700, Jeff C
> <JeffC@discussions.microsoft.com>
[quoted text clipped - 12 lines]
>
>             John W. Vinson [MVP]
Jeff C - 25 Jun 2007 10:14 GMT
I have never used SQL Server or SQL Agent, I should probably get a hold of
those pprograms and start learning them.

As I said initially, I want to run certain sequences on a schedule.  The
particular database I was using is very heavy with numerous reports.  As we
know, reports in Access take up a lot of space, for me anyway they account
for the bulk (80%) of the size of the database.  For some reason this was
what was causing the problem with running a macro from the command line or
script.

My workaround was to create a new empty database and import the data, I then
imported the specific action queries.  The database with all the reports
accounting for the bulk of the size I then linked to the new data in the new
database.  This has worked.  Certain reports are printing to multiple
printers on a schedule, the new data is imported and manipulated on a
schedule, and my hands-on time has dropped to nearly zero.

The idea of running things from a command line had the sole purpose of
allowing me to run the tasks in the scheduler.  Is there another method?
Signature

Jeff C
Live Well .. Be Happy In All You Do

> just use SQL Server and SQL Agent
>
[quoted text clipped - 17 lines]
> >
> >             John W. Vinson [MVP]
BruceM - 25 Jun 2007 13:26 GMT
Ignore everything from Long Live Aaron Kempf and Wickerqueer.  His mission
is to bash Access and those who offer their help.  SQL Server has it uses,
but will not affect reports and other front-end features.

>I have never used SQL Server or SQL Agent, I should probably get a hold of
> those pprograms and start learning them.
[quoted text clipped - 42 lines]
>> >
>> >             John W. Vinson [MVP]
David W. Fenton - 26 Jun 2007 00:56 GMT
> I have never used SQL Server or SQL Agent, I should probably get a
> hold of those pprograms and start learning them.

No, don't bother. The person who "answered" your question is a known
troll with no actual knowledge or skills whose answer to everything
is SQL Server and ADP, even when it is completely irrelevant. Just
ignore it.

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.