Computing.Net > Forums > Windows NT > Access batch file problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Access batch file problem

Reply to Message Icon

Name: Karen
Date: March 12, 2001 at 07:10:41 Pacific
Comment:

I'm trying to get a batch file to do 2 things:

1)Open an MSAccess file using its associated workgroup.
2)Close the DOS command window as soon as Access starts (opening the Access file is the last task in the batch file).

I can pull off one or the other but not both. Using
MSAccess.exe database.mdb /wrkgrp workgroup.mdw
opens the database file, but the command window remains open, frozen at the line which opened the database.

Using
START MSAccess.exe database.mdb /wrkgrp workgroup.mdw
Opens Access and loads the database file, but misses the workgroup file, and I get locked out due to lack of permissions. But, the batch file doesn't hang on the command and closes after Access fires up.

Any suggestions on how/if I can make this work?

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: tazman
Date: March 12, 2001 at 17:00:45 Pacific
Reply:

First where are you trying to open the database, i.e client pc or server. Two you are not supplying the full path to your workgroup.mdw file.
Example: Start MSAccess.exe /wrkgrp C:\Windows\System\workgroup.mdw C:\My Documents\database.mdb
HTH


0

Response Number 2
Name: Karen
Date: March 13, 2001 at 10:25:04 Pacific
Reply:

I'm trying to open the database on a client machine. The front end (and Access) is on the local machine, the workgroup file is on the network.

I do have the full paths in the batch file, but they're so darn long, that I didn't bother retyping them in my message. Everything I've seen on opening an Access file with an associated workgroup file shows the command as:

{{Access path}}\MSAccess.exe {{mdb path}}\database.mdb \wrkgrp {{mdw path}}\workgroup.mdw

which is the format I've been using. I've basically copied the command line from a functional shortcut and pasted it into the batch file. The START command just seems to stop parsing the command when it hits the space before /wrkgrp. I've got lots of spaces and long file names in the paths, so each path is enclosed in quotes. I tried enclosing the entire command in quotes to get it to parse past the flag, but it chokes.

Any other thoughts?

Thanks


0

Response Number 3
Name: Tazman
Date: March 13, 2001 at 16:58:08 Pacific
Reply:

Karen, Here is one I use to open our Telco database on the Client's pc. The databse is on our server. Inside the bat file is the following. All this on one line and using the quotes.
"C:\Program Files\Microsoft Office\Office\MSACCESS.exe" /wrkgrp H:\Telco\lock.mdw H:\Telco\Telco.mdb
HTH Tazman


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: Access batch file problem

Batch File Problem - Comparing www.computing.net/answers/windows-nt/batch-file-problem-comparing/9121.html

Batch File problem www.computing.net/answers/windows-nt/batch-file-problem/22747.html

Batch File Problem www.computing.net/answers/windows-nt/batch-file-problem/21766.html