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 acCmdS

Constant
Value
Description
Code ExampleacCmdSave
20
Saves the current object. Available in both VBE and non-VBE views
acCmdSaveAllModules
280
Saves all Code Modules?
acCmdSaveAllRecords
 
Although this is listed in the Access XP help, it does not appear in the Object Browser nor does it seem to have a value
Code ExampleacCmdSaveAs
21
Displays the Save As/Export selection dialog. Available in both VBE and non-VBE views
acCmdSaveAsASP
323
Same as selecting ASP in the File Save As dialog box
acCmdSaveAsDataAccessPage
389
 
acCmdSaveAsHTML
321
Same as selecting HTML in the File Save As dialog box. Not Save As HTML on File menu which starts Web Wizard. That is acCmdPublish
acCmdSaveAsIDC
322
Same as selecting IDC in the File Save As dialog box
acCmdSaveAsOutlookContact
584
Save a record as an Outlook Contact
Code ExampleacCmdSaveAsQuery
96
Saves a filter as a query
acCmdSaveAsReport
142
Displays the Save a Form as a Report dialog
acCmdSaveAsTemplate
686
acCmdSaveDatabaseAsNewTemplatePart
687
acCmdSavedExports
555
 
acCmdSavedImports
543
 
acCmdSaveLayout
145
Saves the layout of the Relationships window
acCmdSaveModuleAsText
119
Opens the File Save As box when in a module
Code ExampleacCmdSaveRecord
97
Saves the current record
acCmdSaveSelectionAsNewDataType
688
Code ExampleacCmdSelectAll
333
Selects all the contents of the window
Code ExampleacCmdSelectAllRecords
109
Selects all the records
acCmdSelectDataAccessPage
347
Selects the whole data access page when in design mode
acCmdSelectEntireColumn
571
 
acCmdSelectEntireLayout
715
acCmdSelectEntireRow
570
 
Code ExampleacCmdSelectForm
40
Selects the whole form
Code ExampleacCmdSelectRecord
50
Selects the whole of the current record
acCmdSelectReport
319
Selects the Report Object
acCmdSend
173
Opens the default mail system to send selected object
Code ExampleacCmdSendToBack
53
Takes selection behind all other objects
Code ExampleacCmdServerFilterByForm
507
Sets the Server Filter by Form property
acCmdServerProperties
496
 
acCmdSetCaption
637
 
Code ExampleacCmdSetControlDefaults
56
Change the defaults for the selected control
Code ExampleacCmdSetDatabasePassword
275
Displays the Set Database Password dialog
acCmdSetNextStatement
129
Sets the next line of code to be run
acCmdShareOnSharePoint
542
 
acCmdSharePointSiteRecycleBin
641
 
acCmdShowAllRelationships
149
Displays all Relationships in the Relationships window
acCmdShowColumnHistory
620
 
acCmdShowDatePicker
636
 
acCmdShowDirectRelationships
148
Displays all connected Relationships from selected table
acCmdShowEnvelope
533
 
acCmdShowLogicCatalog
685
acCmdShowMembers
302
Displays the methods/properties drop down
acCmdShowMessageBar
676
acCmdShowNextStatement
130
Returns the screen back to the next line of code to run
acCmdShowOnlyWebToolbar
300
Closes all toolbars but the Web toolbar
acCmdShowPaneDiagram
 
This was listed on the Microsoft site but it did not appear in Help nor was it listed in the Object Browser. I think that it should probably be acCmdViewShowPaneDiagram
acCmdShowPaneGrid
 
This was listed on the Microsoft site but it did not appear in Help nor was it listed in the Object Browser. I think that it should probably be acCmdViewShowPaneGrid
acCmdShowPaneSQL
 
This was listed on the Microsoft site but it did not appear in Help nor was it listed in the Object Browser. I think that it should probably be acCmdViewShowPaneSQL
acCmdShowTable
185
Displays the Add Table dialog
acCmdSingleStep
88
Single steps through a macro
Code ExampleacCmdSizeToFit
59
Changes size of control to best fit
Code ExampleacCmdSizeToFitForm
69
Changes the size of the Form Window to it's design size
Code ExampleacCmdSizeToGrid
48
SResizes the selected object so that theier edges are aligned to the grid
Code ExampleacCmdSizeToNarrowest
155
Changes the width of all the selected controls to the width of the narrowest one
Code ExampleacCmdSizeToWidest
156
Changes the width of the selected controls to the width of the widest one
acCmdSnapToGrid
62
Toggles the Snap To Grid option
Code ExampleacCmdSortAscending
163
Sorts by the selected field in ascending order
Code ExampleacCmdSortDescending
164
Sorts by the selected field in descending order
Code ExampleacCmdSortingAndGrouping
51
Displays/hides the sorting and grouping dialog
acCmdSpeech
511
 
Code ExampleacCmdSpelling
269
Runs the Spell Checker
Code ExampleacCmdSQLView
184
Changes to SQL View
acCmdStackedLayout
568
 
acCmdStartNewWorkflow
675
acCmdStartupProperties
224
Opens the Startup Properties dialog
acCmdStepInto
342
Steps into the next line of code
acCmdStepOut
311
Runs code to next statement in calling procedure
acCmdStepOver
128
Steps over a line of code
acCmdStepToCursor
204
Runs through the code to the line containing the cursor
acCmdStopLoadingPage
296
Halts the loading of a Web page
Code ExampleacCmdSubformDatasheet
108
Toggles display of a subform to/from datasheet view
acCmdSubdatasheetCollapseAll
515
 
acCmdSubdatasheetExpandAll
514
 
acCmdSubdatasheetRemove
506
 
Code ExampleacCmdSubformDatasheetView
463
Display a subform as a datasheet
Code ExampleacCmdSubformFormView
462
Display a subform as a form
acCmdSubformInNewWindow
495
 
acCmdSubformPivotChartView
465
 
acCmdSubformPivotTableView
464
 
acCmdSwitchboardManager
521
 
acCmdSynchronize
638
 
acCmdSynchronizeNow
264
Displays the Synchronize Now dialog
acCmdSyncWebApplication
699

© 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.