Click Save, then close the query using the Cancel button. The file has been saved and you will be able to view and save again once reopened.