Thank you for your prompt reply. At first glance, that code looks really scary. I assume that I can muddle through it.
You said, "unless you plan to restart your sequence number every year or day etc.". Yes, as the day changes, I want the sequence number to change.
In other words...