Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using a batch file to open a access database

Status
Not open for further replies.

at51178

Technical User
Mar 25, 2002
587
US
HEY GUYS

I would like to know how to open up a access database using a batch file.

i thought I could just type
the name of the path and the file name for example

c:\mydatabase.mdb


 
Actually, you've got to call Access, the mdb file, and the workgroup file (unless you're using the default).

Here's a sample from one of mine:
"C:\Program Files\Microsoft Office\Office\msaccess.exe" "C:\BnkRecSW\Prdction\Tools\BnkRecFE.mdb" /wrkgrp G:\HOME\BANKREC\BnkRecSW\Prdction\Tools\BnkRec.mdw

It's all one line. It will, of course, require different directories, depending on how your system is set up.

Also, if you're interested in looking into what else you can do with batch files and Access databases, check out the Deploying Databases article on my website.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
You can use the command START to avoid entering the path/filename of the Access executable.

Start <Optional:path/msaccess.exe> c:\mydatabase.mdb

This has the added benefit of opening the application in a new window so that the DOS window closes. If you run the batch file from a hyperlink, the DOS window stays open.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top