From: DianePDavies on
What would the command line be to start a specific Access DB from a bat-fil?
--
Diane
From: Paul Shapiro on
"DianePDavies" <DianePDavies(a)discussions.microsoft.com> wrote in message
news:05792EF8-B3BB-4BDF-87F0-2743A84A1170(a)microsoft.com...
> What would the command line be to start a specific Access DB from a
> bat-fil?

Start "YourWindowTitle" "C:\YourDataFolder\YourDB.mdb"

The double-quotes are needed if your arguments contain any spaces, but
including them is ok either way.

From: Stefan Hoffmann on
hi Diane,

On 08.04.2010 13:34, DianePDavies wrote:
> What would the command line be to start a specific Access DB from a bat-fil?
start "FullPath\Database.mdb"

For further control of Access from the command line, take a look at

http://support.microsoft.com/kb/209207

The command line in general:


http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx

http://commandwindows.com/


mfG
--> stefan <--
From: DianePDavies on
Now it works with:
"C:\Program Files\Microsoft Office\OFFICE11 \MSACCESS.EXE" "C:\DEMO\A.mde"

However - I would like to place the bat-file in the same folder as A.mde and
then not adress A.mde with a full path - similarly I would like to start
MSACCESS.EXE without a full path.

If I can do that I dont need to worry about the specific location on the
various user PCs. I believe there is a constant for the path to
office-programs... and I would assume it is possible to address A.mde locally?

Any suggestions?


--
Diane


"Stefan Hoffmann" wrote:

> hi Diane,
>
> On 08.04.2010 13:34, DianePDavies wrote:
> > What would the command line be to start a specific Access DB from a bat-fil?
> start "FullPath\Database.mdb"
>
> For further control of Access from the command line, take a look at
>
> http://support.microsoft.com/kb/209207
>
> The command line in general:
>
>
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx
>
> http://commandwindows.com/
>
>
> mfG
> --> stefan <--
> .
>
From: Stefan Hoffmann on
hi Diane,

On 12.04.2010 16:34, DianePDavies wrote:
> Now it works with:
> "C:\Program Files\Microsoft Office\OFFICE11 \MSACCESS.EXE" "C:\DEMO\A.mde"
>
> However - I would like to place the bat-file in the same folder as A.mde and
> then not adress A.mde with a full path - similarly I would like to start
> MSACCESS.EXE without a full path.
You always need to specifiy the full path to Access except in one case:

If you don't care which possible installed Access version is used then
you may simply use

Start "C:\DEMO\A.mde"

in your batch.

You may omit the path to the database file, but then your batch does not
work under some circumstances, e.g.

Store your batch under C:\DEMO\Test.cmd with Start A.mde command line.
Open a command line window and switch to the root, C:\.
On C:\ execute your batch:

C:\>\Demo\Test.cmd

This will fail due to the wrong current working directory.


mfG
--> stefan <--