All you need to do what you ask is this small piece of code in the BeforeUpdate event of the form.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Do you want to save the changes?", vbYesNo) = vbNo Then
Me.Undo
End If
End Sub
The BeforeUpdate event *only* executes just before the form is about to save a record for *any* reason, including pressing the RED X in the upper right corner of the form. The close button just needs to close the form with: DoCmd.Close acForm, Me.Name, acSaveNo
You could also open the Switchboard next with: DoCmd.OpenForm "Records_Switchboard" if that is always where you want to take the user when they close this form. Try it.