Go Back   Access World Forums > Microsoft Access Reference > Access FAQs

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 07-22-2009, 05:57 PM   #1
KenHigg
Registered User
 
Join Date: Jun 2004
Posts: 13,309
Thanks: 8
Thanked 155 Times in 129 Posts
KenHigg has a spectacular aura about KenHigg has a spectacular aura about
Command Line Switches

Had to refer to these several times so I thought I'd post them to make it easier:

Code:
Option       Effect                                    Applies to
   -----------------------------------------------------------------
   database     Opens the specified Microsoft Access      Access 
                database or Microsoft Access project.     database or 
                Include a path if necessary. If you are   Access 
                running Windows 95, the default path is   project
                your My Documents folder.	
                            
   /excl        Opens the specified Access database for   Access 
                exclusive access. To open the database    database 
                for shared access in a multiuser          only
                environment, omit this option. 
	
   /ro          Opens the specified Access database or    Access 
                Access project for read-only access.      database or 
                                                          Access 
                                                          project

   /user        Starts Access using the specified user    Access 
   user name    name.                                     database 
                                                          only

   /pwd         Starts Access using the specified         Access 
   password     password.                                 database 
                                                          only

   /profile     Starts Access using the options in the    Access 
   user         specified user profile instead of the     database or 
   profile      standard Microsoft Windows registry       Access 
                settings created when you installed       project
                Access. This replaces the /ini option  	
                used in versions of Access earlier   	
                than Access 97 to specify an   	
                initialization file.

   /compact     Compacts and repairs the Access           Access 
   target       database, or compacts the Access project, database or 
   database or  specified before the /compact option and  Access 
   target       then closes Access. If you omit a target  project
   Access       file name following the /compact option, 	
   project      the file is compacted to the original  	
                name and folder. To compact to a different  
                name, specify a target file. If you don't 	
                include a path in target database or target 	
                Access project, the target file is created  	
                in your My Documents folder by default. In 	
                an Access project, this option compacts 	
                the Access project (.adp) file but not the 	
                SQL Server database. 
	
   /repair      Repairs the Access database specified     Access 
                before the /repair option and then        database 
                closesAccess. In Access 2000, compact     only
                and repair functionality is combined  	
                under /compact. The /repair option is 	
                supported for backward compatibility. 
	
   /convert     Converts an Access database in an         Access 
   target       earlier version to an Access 2000         database 
   database     database with a new name and then closes  only
                Access. Specify the source database  	
                before using the /convert option. 	

   /x  macro    Starts Access and runs the specified      Access 
                macro. Another way to run a macro when    database or 
                you open a database is to use an          Access 
                AutoExec macro.                           project
                             
   /cmd         Specifies that what follows on the        Access 
                command line is the value that will be    database or 
                returned by the Command function. This    Access 
                option must be the last option on the     project
                command line. You can use a semicolon (;)	
                as an alternative to /cmd. 	

   /nostartup   Starts Access without displaying the      Access 
                startup dialog box (the second dialog     database or 
                box that you see when you start Access).  Access 
                                                          project

   /wrkgrp      Starts Access using the specified         Access 
   workgroup    workgroup information file.               database 
   information                                            only
   file

   /runtime     Starts Access in run-time mode.           Accesss 
                                                          database or 
                                                          Access 
                                                          project
Another switch offered by ridders:

/decompile
Undocumented but useful. Removes all compile code from a database

A link that includes instructions on how to use:

http://www.fmsinc.com/MicrosoftAcces...Convention.asp

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

ken

“You don’t learn to walk by following rules. You learn by doing, and by falling over.”

Last edited by pbaldy; 04-20-2017 at 03:52 PM. Reason: add decompile info
KenHigg is offline  
Closed Thread

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Switches / Flip Flops / Iterations joe789 Queries 2 02-20-2008 09:24 AM
Access to word then format using switches GaryPanic Word 0 02-11-2008 01:06 PM
Command-Line Switches in URL Kix_N_Grins Modules & VBA 1 03-15-2007 08:30 AM
Short cut blues / command line switches / WIF Keith Nichols General 9 02-18-2006 09:50 AM
Runapp with switches? Franky G Macros 3 04-12-2001 03:18 AM




All times are GMT -8. The time now is 08:14 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World