DoCmd Property [Access 2003 VBA Language Reference]

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


expression Required. An expression that returns one of the objects in the Applies To list.


This property is available only by using Visual Basic .


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

Sub ShowNewRecord()
    DoCmd.OpenForm "Employees", acNormal
    DoCmd.GoToRecord , , acNewRec
End Sub

Applies to | Application Object