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 acCmdS

Constant
Description
Value

Code ExampleacCmdSave
Saves the current object. Available in both VBE and non-VBE views
20

acCmdSaveAllModules
Saves all Code Modules?
280

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
Displays the Save As/Export selection dialog. Available in both VBE and non-VBE views
21

acCmdSaveAsASP
Same as selecting ASP in the File Save As dialog box
323

acCmdSaveAsDataAccessPage
 
389

acCmdSaveAsHTML
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
321

acCmdSaveAsIDC
Same as selecting IDC in the File Save As dialog box
322

acCmdSaveAsOutlookContact
 
584

Code ExampleacCmdSaveAsQuery
Saves a filter as a query
96

acCmdSaveAsReport
Displays the Save a Form as a Report dialog
142

acCmdSavedExports
 
555

acCmdSavedImports
 
543

acCmdSaveLayout
Saves the layout of the Relationships window
145

acCmdSaveModuleAsText
Opens the File Save As box when in a module
119

Code ExampleacCmdSaveRecord
Saves the current record
97

Code ExampleacCmdSelectAll
Selects all the contents of the window
333

Code ExampleacCmdSelectAllRecords
Selects all the records
109

acCmdSelectDataAccessPage
Selects the whole data access page when in design mode
347

acCmdSelectEntireColumn
 
571

acCmdSelectEntireRow
 
570

Code ExampleacCmdSelectForm
Selects the whole form
40

Code ExampleacCmdSelectRecord
Selects the whole of the current record
50

acCmdSelectReport
Selects the Report Object
319

acCmdSend
Opens the default mail system to send selected object
173

Code ExampleacCmdSendToBack
Takes selection behind all other objects
53

Code ExampleacCmdServerFilterByForm
Sets the Server Filter by Form property
507

acCmdServerProperties
 
496

acCmdSetCaption
 
637

Code ExampleacCmdSetControlDefaults
Change the defaults for the selected control
56

Code ExampleacCmdSetDatabasePassword
Displays the Set Database Password dialog
275

acCmdSetNextStatement
Sets the next line of code to be run
129

acCmdShareOnSharePoint
 
542

acCmdSharePointSiteRecycleBin
 
641

acCmdShowAllRelationships
Displays all Relationships in the Relationships window
149

acCmdShowColumnHistory
 
620

acCmdShowDatePicker
 
636

acCmdShowDirectRelationships
Displays all connected Relationships from selected table
148

acCmdShowEnvelope
 
533

acCmdShowMembers
Displays the methods/properties drop down
302

acCmdShowNextStatement
Returns the screen back to the next line of code to run
130

acCmdShowOnlyWebToolbar
Closes all toolbars but the Web toolbar
300

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
Displays the Add Table dialog
185

acCmdSingleStep
Single steps through a macro
88

Code ExampleacCmdSizeToFit
Changes size of control to best fit
59

Code ExampleacCmdSizeToFitForm
Changes the size of the Form Window to it's design size
69

Code ExampleacCmdSizeToGrid
SResizes the selected object so that theier edges are aligned to the grid
48

Code ExampleacCmdSizeToNarrowest
Changes the width of all the selected controls to the width of the narrowest one
155

Code ExampleacCmdSizeToWidest
Changes the width of the selected controls to the width of the widest one
156

acCmdSnapToGrid
Toggles the Snap To Grid option
62

Code ExampleacCmdSortAscending
Sorts by the selected field in ascending order
163

Code ExampleacCmdSortDescending
Sorts by the selected field in descending order
164

Code ExampleacCmdSortingAndGrouping
Displays/hides the sorting and grouping dialog
51

acCmdSpeech
 
511

Code ExampleacCmdSpelling
Runs the Spell Checker
269

Code ExampleacCmdSQLView
Changes to SQL View
184

acCmdStackedLayout
 
568

acCmdStartupProperties
Opens the Startup Properties dialog
224

acCmdStepInto
Steps into the next line of code
342

acCmdStepOut
Runs code to next statement in calling procedure
311

acCmdStepOver
Steps over a line of code
128

acCmdStepToCursor
Runs through the code to the line containing the cursor
204

acCmdStopLoadingPage
Halts the loading of a Web page
296

Code ExampleacCmdSubformDatasheet
Toggles display of a subform to/from datasheet view
108

acCmdSubdatasheetCollapseAll
 
515

acCmdSubdatasheetExpandAll
 
514

acCmdSubdatasheetRemove
 
506

Code ExampleacCmdSubformDatasheetView
Display a subform as a datasheet
463

Code ExampleacCmdSubformFormView
Display a subform as a form
462

acCmdSubformInNewWindow
 
495

acCmdSubformPivotChartView
 
465

acCmdSubformPivotTableView
 
464

acCmdSwitchboardManager
 
521

acCmdSynchronize
 
638

acCmdSynchronizeNow
Displays the Synchronize Now dialog
264