If you will execute it the right way: Closing one form will save the content for this form. No possibility to cancel saving. If you didn’t notice you changed something it will be saved without any warning.
The code must be executed before the form has been closed. Your code is only for closing one form-document and opening another form-document. The code for saving the form will need the form, which is part of the form-document. If you are starting the macro by a button inside the form you want to close:
Sub openForm(oEvent AS OBJECT)
oForm = oEvent.Source.Model.Parent
IF oForm.isNew THEN
oForm.insertRow()
ELSE
oForm.updateRow()
END IF
ThisDatabaseDocument.FormDocuments.getbyname("<Old Form>").close
oNewFormDocument=ThisDatabaseDocument.FormDocuments.getbyname("<New Form>").open
End Sub