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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Batch FIle to Start Access 2003

Status
Not open for further replies.

altgov

MIS
Jan 25, 2002
7
US
I have an Access 2003 database that I am starting with a batch file to run a utility macro that I have written. Is there a command that I can add to my bathc command to make the database open without waiting for a user response to open the database?

My batch commands are:
"C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "c:\ChLeader\conv_CHLD%1.mdb" /x mcrAgencySelectBatch

"C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE" "c:\ChLeader\conv_CHLD%1.mdb" /compact
 
I can't help with the Batch file command. If it were me I would create an AutoExec macro that runs when you open the database in Access and then ends with the Application.Quit command to close Access.

Hope this helps.

OnTheFly
 
OK, I've given up on trying to resolve this issue from the batch command side. Looking at OnTheFly's solution has pushed me to find the AutomationSecurity property.

It is a Security Warning that is stopping my automated process. Company standards have set the default security level to Medium, so my app won't open without intervention.

It seems that the AutomationSecurity property should resolve this issue, but I am have difficulty getting the coding right.

Anyone have some sample code to temporarily change the security level of an Access app on startup, and then change it back one the app is open?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top