Here is my problem,
In this form I am looking to add a record but I want to be able to cancel and delete this addition if they change there mind. The catch is if they don't enter any data then there is no record and I get the error no current record. Is there code I can use to check and tell it to just close the form if it's a new record?
Here is my code
Private Sub cmdCancel_Click()
On Error GoTo errr
If MsgBox("Cancel this record?", vbQuestion + vbYesNo, "Delete") = vbYes Then
If MsgBox("Do you realy want to cancel the record", vbQuestion + vbYesNo, "delete") = vbYes Then
Me.Recordset.Delete
DoCmd.Close
End If
End If
errr:
MsgBox Err.Description
End Sub