D
DS
I have a form based on a table, the form is data entry only. I have
this code on a button. If the user enters nothing into the Name field
and decides to cancel I want to close the form. But if the user enters
something into the Name field and decides to cancel I want to undo the
record and close the form. The first part IsNull(Me.Name) doesn't seem
to work, I keep getting the error message Undo unavailable, which leds
me to believe that the first part is not working any help appreciated.
Thanks
DS
If IsNull(Me.Name) Then
DoCmd.Close acForm, "PartyPlannerAdd"
Else:
DoCmd.RunCommand acCmdUndo
Forms!PartyPlanner!ListParty.Requery
DoCmd.Close acForm, "PartyPlannerAdd"
End If
this code on a button. If the user enters nothing into the Name field
and decides to cancel I want to close the form. But if the user enters
something into the Name field and decides to cancel I want to undo the
record and close the form. The first part IsNull(Me.Name) doesn't seem
to work, I keep getting the error message Undo unavailable, which leds
me to believe that the first part is not working any help appreciated.
Thanks
DS
If IsNull(Me.Name) Then
DoCmd.Close acForm, "PartyPlannerAdd"
Else:
DoCmd.RunCommand acCmdUndo
Forms!PartyPlanner!ListParty.Requery
DoCmd.Close acForm, "PartyPlannerAdd"
End If