Link to home
Start Free TrialLog in
Avatar of ksilvoso
ksilvosoFlag for United States of America

asked on

AccessCommand Button to cancel an Add New Record

Is there an AccessCommand Button to cancel an Add New Record?
Avatar of jefftwilley
jefftwilley
Flag of United States of America image

the DoCmd.GoToRecord , , acFirst
will take you back to the first record
once you go to the new record...are you trying to cancel IF they have already entered something into the new record?
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can also close the form with

Private Sub cmdCancel_Click()
     If Me.Dirty Then Me.Undo
     DoCmd.Close acForm, Me.Name
End Sub
 
Avatar of ksilvoso

ASKER

Worked great.  Thanks!