access holding down shift equivalent

Kempes

Registered User.
Local time
Today, 17:20
Joined
Oct 7, 2004
Messages
327
Hi all.

Access 97.

I know that holding shift will take you directly to the db window. However, If opening through a batch file, is there a switch I can use to tell it to open as if I was holding down shift? (ie, the autoexec macro is ignored and it goes directly to the db window).

Many thanks
Kempes
 
one thing you can do in the batch file is run macro's at startup, maybe you can assign another macro to run instead of the Autoexec?

I have never tried anything like this... but this macro would then set a variable or something to show the Database window...
 
Thanks for the advice.

I was hoping not to have to alter the access database if possible, but I don't think there is any alternative.
 
Thanks for this.

I did notice /Nostartup but couldn't get it to work, and dismissed it thinking it wasn't the correct way of doing it. However, your link suggests this works. I am also using a workgroup information file. currently by adding /nostartup in, it still runs the autoexec.

"c:\Program Files\Microsoft Office\Office\msaccess.exe" /nostartup "\\dbpath.mdb" /wrkgrp "\\Workgroupfilepath.mdw" /user "xxxx" /pwd "xxxx" /x macro1

I will persevere.
 
Last edited:
when putting it at the start, cmd flashes up and dissapears, but the macro doesn't run.

I spotted /runtime too, but this throws up a DLL error on MSo97rt.dll.

is there anyway round this without having to install the developer version on 97?
 
Last edited:
I dont know, sorry, I havent done anything like this.
/Runtime I think runs the DB as if you are running in a runtime version, most have a 'real' version though.
Runtime does have some specific requirements for it to work, again I dont do this very often.
 
If this will be of any help to anyone in the future, I found a solution.

In my batch file, before opening the database, I had it create a token file.

In the db, create a new module which looks to see if the token file exists. If it does, run the export CSV macro and exit. If it doesn't, open the database as normal.

Change the autoexec macro to run this code first.

Now, when the batch file is run from a scheduled task (in the night when no-one uses it), it creates the token file, opens the db, the db creates the CSV export and closes, then deletes the token file.

Job done!
 
when putting it at the start, cmd flashes up and dissapears, but the macro doesn't run.

I spotted /runtime too, but this throws up a DLL error on MSo97rt.dll.

is there anyway round this without having to install the developer version on 97?

Try putting PAUSE in the line below your command line statement, this should keep the window open so you can read the detailed error message :)
 
You can also use the command line to have the database start a Macro other than your autoexec... this can then kick the code to do report and close...

I didnt quite understand your question appearently and/or did not look at it the right way.
 

Users who are viewing this thread

Back
Top Bottom