i use a personalized id: FormatNuber(date/time & personid) so i don't have problems on deleting stuff.
found this solution and seems to be the right one
this is the click event of the button i use to exit the form without saving
Code:
If Me.NewRecord Then Dim RsSub As dao.Recordset
Set RsSub = Me.Partecipanti.Form.RecordsetClone
RsSub.MoveFirst
Do Until RsSub.EOF
DoCmd.RunSQL ("DELETE Partecipanti.* FROM Partecipanti WHERE (((Partecipanti.ID)= " & RsSub![ID] & "));")
RsSub.MoveNext
Loop
End If
DoCmd.Close acForm, "calendario", acSaveNo
and then i addedd the rssub.close and = nothing
thanks for the help