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. The list in Access Help and the one 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, Access 2007 or Access 2010. 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
Value
Description
acCmdCalculatedColumn
698
acCmdCallStack
172
Displays a list of active procedure calls
Code ExampleacCmdChangeToCheckBox
231
Changes selected control to a check box
Code ExampleacCmdChangeToComboBox
230
Changes selected control to a combo box
acCmdChangeToCommandButton
501
Changes selection to a command button
Code ExampleacCmdChangeToImage
234
Changes selected control to an image
Code ExampleacCmdChangeToLabel
228
Changes selected control to a label
Code ExampleacCmdChangeToListBox
229
Changes selected control to a list box
Code ExampleacCmdChangeToOptionButton
233
Changes selected control to an option button
Code ExampleacCmdChangeToTextBox
227
Changes selected control to a textbox
Code ExampleacCmdChangeToToggleButton
232
Changes selected control to a toggle button
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
146
Clears all tables from the Relationships window
acCmdClearAllBreakpoints
132
Clears all break points in the database
Code ExampleacCmdClearGrid
71
Clears all information from the QBE grid
Code ExampleacCmdClearHyperlink
343
Clears a hyperlink field
acCmdClearItemDefaults
237
No idea at all. Possibly something to do with defaults in the design of Forms and reports
Code ExampleacCmdClose
58
Closes object which has the focus
acCmdCloseAll
646
Closes all open windows
acCmdCloseDatabase
538
Closes the database
Code ExampleacCmdCloseWindow
186
Closes the current window
Code ExampleacCmdColumnWidth
117
Displays the Column Width dialog
Code ExampleacCmdCompactDatabase
4
Compacts a database - but will not compact the open database
acCmdCompatCheckCurrentObject
696
acCmdCompatCheckDatabase
695
acCmdCompileAllModules
125
Compiles all modules
Code ExampleacCmdCompileAndSaveAllModules
126
Compiles and saves all modules in the database
acCmdCompileLoadedModules
290
Compiles loaded modules
acCmdCompleteWord
306
Displays list of objects/methods
acCmdConditionalFormating
500
Opens conditional formatting dialog
Code ExampleacCmdConnection
383
Connects the database to a server
acCmdControlMarginsMedium
630
 
acCmdControlMarginsNarrow
629
 
acCmdControlMarginsNone
628
 
acCmdControlMarginsWide
631
 
acCmdControlPaddingMedium
634
 
acCmdControlPaddingNarrow
633
 
acCmdControlPaddingNone
632
 
acCmdControlPaddingWide
635
 
acCmdControlWizardsToggle
197
Turns the control wizard on and off
Code ExampleacCmdConvertDatabase
171
Opens the Convert Database dialog
acCmdConvertLinkedTableToLocal
700
Code ExampleacCmdConvertMacrosToVisualBasic
279
Converts macros to code
Code ExampleacCmdCopy
190
Copies the selection to the clipboard. Available in both VBE and non-VBE views
acCmdCopyDatabaseFile
516
Makes a copy of the current Microsoft SQL Server 7.0 or later database connected to your Microsoft Access project. See Access Help on CopyDatabaseFile Action for more information
Code ExampleacCmdCopyHyperlink
328
Copies the hyperlink
acCmdCreateMenuFromMacro
334
Creates a menu toolbar from a macro
acCmdCreateRelationship
150
Displays the Create Relationship dialog
acCmdCreateReplica
263
Displays the Create Replica dialog???
Code ExampleacCmdCreateShortcut
219
Opens the Create Shortcut dialog
acCmdCreateShortcutMenuFromMacro
336
Creates a shortcut menu from a macro
acCmdCreateToolbarFromMacro
335
Creates a toolbar from a macro
acCmdCut
189
Cuts the selection to the clipboard. Available in both VBE and non-VBE views

© 1998 - 2011 Terry Wickenden TKW Design Site developed, maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.