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 / Macros / September 2007

Tip: Looking for answers? Try searching our database.

Prevent AutoExec macro while using command line /decompile

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ilya - 12 Sep 2007 09:46 GMT
Hi all!

Is there a way of preventing the AutoExec macro to start when using /
decompile in command line. I'd like to schedule /decompile action on
an MDB file but every time I execute the "<Access Path> <File path> /
decompile /nostartup" after the decompilation process it starts the
application. Is there a way to bypass it?
I need to make a compact & repair afterwards but the script is stuck
in the application that is opened and does not continue.

I use Access 2002 on Windows XP and some shell script to perform the
desired actions.

Appreciate any help on the issue!

Thanks a lot in advance,
Ilya
KARL DEWEY - 12 Sep 2007 17:20 GMT
Why not rename the Autoexec to X_Autoexec?
Signature

KARL DEWEY
Build a little - Test a little

> Hi all!
>
[quoted text clipped - 13 lines]
> Thanks a lot in advance,
> Ilya
Ilya - 16 Sep 2007 08:37 GMT
On Sep 12, 6:20 pm, KARL DEWEY <KARLDE...@discussions.microsoft.com>
wrote:
> Why not rename the Autoexec to X_Autoexec?
> --
[quoted text clipped - 18 lines]
> > Thanks a lot in advance,
> > Ilya

Hi, KARL!

Actually I do need the AutoExec macro for use in the application
itself. I wanted to know if there is a way to prevent the AutoExec
from starting while using /decompile. When I use the same script for /
compact /nostart AutoExec does not start but the decompilation fires
the AutoExec after completing. There is a way of holding Shift key all
the way down while decompiling to prevent AutoExec from firing but
what's the point of the automatic script then?

Thanks for any help.
Ilya
Ilya - 17 Sep 2007 12:46 GMT
> Hi all!
>
[quoted text clipped - 13 lines]
> Thanks a lot in advance,
> Ilya

Does anyone have an idea how to solve the issue?

Thanks in advance,
Ilya
Douglas J. Steele - 17 Sep 2007 22:49 GMT
>> Hi all!
>>
[quoted text clipped - 10 lines]
>
> Does anyone have an idea how to solve the issue?

Try holding down the shift key while you're executing the decompile.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

Ilya - 18 Sep 2007 10:19 GMT
On Sep 17, 11:49 pm, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:

> >> Hi all!
>
[quoted text clipped - 16 lines]
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no private e-mails, please)

Douglas hi,

The process should be run on schedule and automatically.
It's a bit problem to jump to the office at night just top hold down a
shift key so the decompilation won't start the Autoexec macro...

Does anyone has some idea?

Thanks,
Ilya
Ken Snell (MVP) - 18 Sep 2007 14:37 GMT
One off-the-wall thought -

Have your nightly routine create a text file with a specific filename on
your computer/server before it calls the decompilation process, then have it
delete the file after the decopilation process. Change the AutoExec
procedure to use the Dir function to see if the text file exists, and if
yes, stop the macro.

Signature

       Ken Snell
<MS ACCESS MVP>

> On Sep 17, 11:49 pm, "Douglas J. Steele"
> <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
[quoted text clipped - 30 lines]
> Thanks,
> Ilya
Ilya - 23 Sep 2007 15:07 GMT
On Sep 18, 3:37 pm, "Ken Snell \(MVP\)"
<kthsneisll...@ncoomcastt.renaetl> wrote:
> One off-the-wall thought -
>
[quoted text clipped - 46 lines]
> > Thanks,
> > Ilya

Ken, hi!

Your idea was brilliant and worked perfect.
I used Scripting.FileSystemObject to check for file existense and
added an Application.Quit for the case the file exists. Works as a
watch!

Good luck and thanks,
Ilya
Ken Snell (MVP) - 24 Sep 2007 18:15 GMT
> On Sep 18, 3:37 pm, "Ken Snell \(MVP\)"
> <kthsneisll...@ncoomcastt.renaetl> wrote:
[quoted text clipped - 16 lines]
> Good luck and thanks,
> Ilya

You're welcome.
Signature


       Ken Snell
<MS ACCESS MVP>

David W. Fenton - 19 Sep 2007 17:22 GMT
> The process should be run on schedule and automatically.
> It's a bit problem to jump to the office at night just top hold
> down a shift key so the decompilation won't start the Autoexec
> macro...
>
> Does anyone has some idea?

Don't use an Autoexec macro. Instead, put whatever is in your
Autoexec macro into code, and call that code in a hidden startup
form.

In the startup form, check the COMMAND statement. If it returns
anything, that means something was passed on the commandline with
the /cmd switch. That allows you to run the database with a
commandline switch that will cause it to bypass the end-user startup
routines.

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.