You can use code similar to this in a command button that will close the form. Be sure and remove the X in the upper right of the form so that user has to use your command button to close the form:
If Me.NewRecord Then
Select Case MsgBox("Do you want to save this record?", vbYesNo Or vbExclamation Or vbDefaultButton1, Application.Name)
There are a lot of ways to skin this particular Access cat and this is just one of them...