Application.DoCmd Property

Access Developer Reference

You can use the DoCmd property to access the read-only DoCmd object and its related methods. Read-only DoCmd.

Syntax

expression.DoCmd

expression   A variable that represents an Application object.

Example

The following example opens a form in Form view and moves to a new record.

Visual Basic for Applications
  Sub ShowNewRecord()
    DoCmd.OpenForm "Employees", acNormal
    DoCmd.GoToRecord , , acNewRec
End Sub