Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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

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

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

![]() |
![]() |
![]() |

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