G
glnbnz
I am having a problem with closing a form without saving a record.
If IsNull(txtUserName) Then
DoCmd.Close acForm, "Edit - Add new user", acSaveNo
Call OpenControl
Else
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.Close acForm, "Edit - Add new user", acSaveNo
Call OpenControl
End If
When I run this code the true side is fine. On the false side I receive an
runtime error and "The command 'DeleteRecord' isn't available now" I don't
know why....could someone help me on this.
Thank You
If IsNull(txtUserName) Then
DoCmd.Close acForm, "Edit - Add new user", acSaveNo
Call OpenControl
Else
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.Close acForm, "Edit - Add new user", acSaveNo
Call OpenControl
End If
When I run this code the true side is fine. On the false side I receive an
runtime error and "The command 'DeleteRecord' isn't available now" I don't
know why....could someone help me on this.
Thank You