Starting Access from a .bat file

G

Guest

I have a batch file that I want to distribute that will check the user's local version of an Access front-end, and then go and get the latest one if needed, and then start the front end, using the appropriate security workgroup. Can someone help me with the command to do this? This is what I have now::
START "C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSACCESS.EXE" "C:\PROGRAM FILES\NAME\FE_VerA.MDB" /wrkgrp "Z:\TBSecurity.mdw"

When I run this in the DOS window, it starts Access, opens the file but doesn't use the right workgroup, and I get an error in the DOS window that says that it doesn't recognize /wkrgp. How do you add on the additional parameters to specify the workgroup?

Thanks for your help!

Clarissa
 
D

Douglas J. Steele

/wrkgrp should work. In your error message, though, you say /wkrgp. You sure
you've got it correct in the batch file?

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Clarissa said:
I have a batch file that I want to distribute that will check the user's
local version of an Access front-end, and then go and get the latest one if
needed, and then start the front end, using the appropriate security
workgroup. Can someone help me with the command to do this? This is what I
have now::
START "C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSACCESS.EXE" "C:\PROGRAM
FILES\NAME\FE_VerA.MDB" /wrkgrp "Z:\TBSecurity.mdw"
When I run this in the DOS window, it starts Access, opens the file but
doesn't use the right workgroup, and I get an error in the DOS window that
says that it doesn't recognize /wkrgp. How do you add on the additional
parameters to specify the workgroup?
 
G

Guest

In answer to your question, it is spelled correctly in the command-line. But, do you know what? It seems to work if I just delete START from the command-line. Isn't that strange? Anyway, I guess it's solved.
 
G

Guest

Okay, so it works properly if I drop START from the beginning of the command line, but now, it doesn't "listen" to my EXIT command after opening Access to close the command prompt window. It stays open until the user closes Access (or manually closes it themselves). Any ideas?

Thanks,
Clarissa
 
J

Joe Fallon

http://www.granite.ab.ca/access/autofe.htm

Tony Toews publishes a free utility to auto update the Front End.
It is very handy and works for an entire folder of files, not just the FE
file.
e.g Documentation files, spreadsheets, etc can be kept up to date by posting
them to a server folder and then everyone downloads the latest copy whenever
they start the app.
--
Joe Fallon
Access MVP



Clarissa said:
I have a batch file that I want to distribute that will check the user's
local version of an Access front-end, and then go and get the latest one if
needed, and then start the front end, using the appropriate security
workgroup. Can someone help me with the command to do this? This is what I
have now::
START "C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\MSACCESS.EXE" "C:\PROGRAM
FILES\NAME\FE_VerA.MDB" /wrkgrp "Z:\TBSecurity.mdw"
When I run this in the DOS window, it starts Access, opens the file but
doesn't use the right workgroup, and I get an error in the DOS window that
says that it doesn't recognize /wkrgp. How do you add on the additional
parameters to specify the workgroup?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top