CommandExecute Event

Microsoft Access Visual Basic

Private Sub Form_CommandBeforeExecute(ByVal Command As Variant)

Command    The command that is executed.

Remarks

The OCCommandId, ChartCommandIdEnum, and PivotCommandId constants contain lists of the supported commands for each of the Microsoft Office Web Components.

Example

The following example demonstrates the syntax for a subroutine that traps the CommandExecute event.

Private Sub Form_CommandExecute(ByVal Command As Variant)
   MsgBox "The command specified by " _
        & Command.Name & " has been executed."
End Sub