I like it.
It addresses the concerns raised by @Wanderer (which were concerns I had as well), and I was also able to roll @Renel’s solution to my automatic form-open question into the DatabaseStart sub:
ThisDatabaseDocument.CurrentController.connect("","")
ThisDatabaseDocument.FormDocuments.getByName("Name of the form").open
My original concern, though, was to do a separate automatic backup, to a user-selected name, right before end-of-year processing, which does a lot of things that can’t be undone.
The end-of-year process for my “Charities” database is as follows:
Given that each organization’s record has seven sets of date, note, and amount, as well as “most recent date” and “total amount” fields for last year, and for prior to last year,
- A message box is brought up for confirmation.
- The date of the most recent contribution from last year (if any) is copied to the date of the most recent contribution prior to last year, for each organization’s record
- The date of the most recent contribution in the current year is copied to the date of the most recent contribution from last year, for each organization’s record.
- The total for last year is added to the total prior to last year, for each organization.
- The calculated total for the current year is copied to the total for last year, for each organization.
- The seven date, note, and amount fields are nulled out for each organization.