Code to save the connected .odb when closing the Form

Hi.
After failing to pass the filter to DoCmd in Access2Base - to open a Report
I parametrized @Villeroy’s free floating Form.
It works fine. But of course, when closing, it asks for saving the biblio.odb.
How to code this on closing the form?
 
Thanks in advance!

Might be something like

SUB DataSave(oEvent AS OBJECT)
 oEvent.Source.activeConnection.Parent.flush
END SUB

Would connect this to “After record action” in the form. There had been the same buggy behavior for Firebird.

menu:File>Properties…
Tab Security
Open Read-Only
Save.
Now you never get any questions about the unsaved document. You will be prompted for any unsaved form data.
A form’s filter and sort criteria can be changed but won’t be stored unless you store them with the document in read-write access.

Not buggy at all. DB is changed as I set the parameter for the Report’s source query.
And after running it, reset to ? of course.
Rem: as I understand, Report has no .Command property, right?

Was thinking like “On form closing” :thinking:
But thank you. Will see this in next days as I’m on another machine now.

It may be asking to save a modified Writer document or modified form data linked to the “biblio” table. Bibliography.odb remains unopened and untouched.