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 acCmdR

Constant
Value
Description
Code ExampleacCmdRecordsGoToFirst
67
Moves to the first record
Code ExampleacCmdRecordsGoToLast
68
Moves to the last record
Code ExampleacCmdRecordsGoToNew
28
Moves to a new record
Code ExampleacCmdRecordsGoToNext
65
Moves to the next record
Code ExampleacCmdRecordsGoToPrevious
66
Moves to the previous record
acCmdRecoverDesignMaster
265
Displays the Recover Design Master dialog
acCmdRedo
199
Redoes last thing that was undone
acCmdReferences
260
Displays the References dialog
Code ExampleacCmdRefresh
18
Refreshes the data in the active window
acCmdRefreshData
541
 
Code ExampleacCmdRefreshPage
297
Brandon Skeen tells me that he uses this command to refresh a sub form and all its fields behind an OnChange event
Code ExampleacCmdRefreshSharePointList
626
Used to refresh all linked SharePoint tables.
acCmdRegisterActiveXControls
254
Opens the ActiveX Controls dialog
Code ExampleacCmdRelationships
133
Opens the Relationships window
acCmdRemove
366
 
acCmdRemoveAllFilters
644
 
acCmdRemoveAllSorts
645
 
acCmdRemoveFilterFromCurrentColumn
643
 
Code ExampleacCmdRemoveFilterSort
144
Removes all filters and sorts
acCmdRemoveFromLayout
582
 
acCmdRemoveTable
84
Removes the selected table from the QBE grid
acCmdRename
143
Allows the editing of the name of the object selected in the database window
acCmdRenameColumn
274
Highlights column heading to enable renaming
acCmdRenameGroup
492
 
Code ExampleacCmdRepairDatabase
6
Opens the Repair Database file selection dialog box. Note this cannot be used to repair the current database
Code ExampleacCmdReplace
29
Opens the Replace dialog. Available in both VBE and non-VBE views
Code ExampleacCmdReportHdrFtr
37
Adds or removes report headers and footers
acCmdReportView
539
 
acCmdReset
124
Resets running code
acCmdResolveConflicts
266
Displays the Resolve Replication Conflicts dialog
acCmdRestore
514
 
acCmdRowHeight
116
Displays the Row Height dialog
Code ExampleacCmdRun
181
Runs a query
Code ExampleacCmdRunMacro
31
Opens the Run Macro dialog
acCmdRunOpenMacro
338
Run a macro

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