Application.DoCmd property (Access)

Use the DoCmd property to access the read-only DoCmd object and its related methods. Read-only DoCmd.



expression A variable that represents an Application object.


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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.