G
glnbnz
All I want to do is close a form without saving anything in the text boxes.
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
I figured this would not be so hard to accomplish. The true side works
fine. But if something is in the box I receive a run-time error and "The
command or action 'DeleteRecord' isn't available now." I don't know
why....could someone please help me.
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
I figured this would not be so hard to accomplish. The true side works
fine. But if something is in the box I receive a run-time error and "The
command or action 'DeleteRecord' isn't available now." I don't know
why....could someone please help me.
Thank you