Ah yes. Sorry about that Ajax
Thank you very much. I'm not sure this is practicable, but I shall have another look at it.
I am very grateful for all the help and suggestions from people on this forum!
Yes, I have tried this several times! But thank you.
As I had wanted to edit the closing routine, I think I shall now write a new routine for closing - in a copy of the database - and see what happens!
Presumably, if there is a clash with an earlier routine, it will be flagged up.
I had thought that Access 2019 might have a simple way of attaching a routine for closing (as one can choose from Options to have a form open automatically), but that I was missing it.
I really am very grateful for all your help.