Full List of All RunCommand Constants

Here is a complete list of RunCommand constants with a description of their function where I know what they do. Both the list in Access Help and the list obtainable on the Microsoft Web Site are incomplete and contradict one another.

I have colour coded the list dependent on the version in which they first appeared - Access 97, Access 2000, Access XP, Access 2003 or Access 2007. Prior to Access 2007, all later versions of Access recognise the earlier commands. See Known Problems for more details. Some of these were retained for backwards compatibility only. If you spot any errors or can fill the gaps please let me know.

Code Link links to code examples for that constant. Select the start letter, ignoring the acCmd, of the constant.

Select the sixth letter of the acCmdConstant
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Constants starting acCmdC

Constant
Description
Value

acCmdCallStack
Displays a list of active procedure calls
172

Code ExampleacCmdChangeToCheckBox
Changes selected control to a check box
231

Code ExampleacCmdChangeToComboBox
Changes selected control to a combo box
230

acCmdChangeToCommandButton
Changes selection to a command button
501

Code ExampleacCmdChangeToImage
Changes selected control to an image
234

Code ExampleacCmdChangeToLabel
Changes selected control to a label
228

Code ExampleacCmdChangeToListBox
Changes selected control to a list box
229

Code ExampleacCmdChangeToOptionButton
Changes selected control to an option button
233

Code ExampleacCmdChangeToTextBox
Changes selected control to a textbox
227

Code ExampleacCmdChangeToToggleButton
Changes selected control to a toggle button
232

acCmdChartSortAscByTotal
Although this constant is listed in the Access XP help, it does not appear in the Object Browser nor does not seem to have a value
 

acCmdChartSortDescByTotal
Although this constant is listed in the Access XP help, it does not appear in the Object Browser nor does not seem to have a value
 

acCmdClearAll
Clears all tables from the Relationships window
146

acCmdClearAllBreakpoints
Clears all break points in the database
132

Code ExampleacCmdClearGrid
Clears all information from the QBE grid
71

Code ExampleacCmdClearHyperlink
Clears a hyperlink field
343

acCmdClearItemDefaults
No idea at all. Possibly something to do with defaults in the design of Forms and reports
237

Code ExampleacCmdClose
Closes object which has the focus
58

acCmdCloseAll
 
646

acCmdCloseDatabase
 
538

Code ExampleacCmdCloseWindow
Closes the current window
186

Code ExampleacCmdColumnWidth
Displays the Column Width dialog
117

Code ExampleacCmdCompactDatabase
Compacts a database - but will not compact the open database
4

acCmdCompileAllModules
Compiles all modules
125

Code ExampleacCmdCompileAndSaveAllModules
Compiles and saves all modules in the database
126

acCmdCompileLoadedModules
Compiles loaded modules
290

acCmdCompleteWord
Displays list of objects/methods
306

acCmdConditionalFormating
Opens conditional formatting dialog
500

Code ExampleacCmdConnection
Connects the database to a server
383

acCmdControlMarginsMedium
 
630

acCmdControlMarginsNarrow
 
629

acCmdControlMarginsNone
 
628

acCmdControlMarginsWide
 
631

acCmdControlPaddingMedium
 
634

acCmdControlPaddingNarrow
 
633

acCmdControlPaddingNone
 
632

acCmdControlPaddingWide
 
635

acCmdControlWizardsToggle
Turns the control wizard on and off
197

Code ExampleacCmdConvertDatabase
Opens the Convert Database dialog
171

Code ExampleacCmdConvertMacrosToVisualBasic
Converts macros to code
279

Code ExampleacCmdCopy
Copies the selection to the clipboard. Available in both VBE and non-VBE views
190

acCmdCopyDatabaseFile
 
516

Code ExampleacCmdCopyHyperlink
Copies the hyperlink
328

acCmdCreateMenuFromMacro
Creates a menu toolbar from a macro
334

acCmdCreateRelationship
Displays the Create Relationship dialog
150

acCmdCreateReplica
Displays the Create Replica dialog???
263

Code ExampleacCmdCreateShortcut
Opens the Create Shortcut dialog
219

acCmdCreateShortcutMenuFromMacro
Creates a shortcut menu from a macro
336

acCmdCreateToolbarFromMacro
Creates a toolbar from a macro
335

acCmdCut
Cuts the selection to the clipboard. Available in both VBE and non-VBE views
189