I have a database that has a separate index ID so that each Accession has a unique number.

I need to track the Accession numbers by the Prefix "S" and then the last two digits of the year. (ie 2019 would be "S19" and 2020 would be "S20")

So the system tracks Accession numbers by the Year "S19" and then in a numeric sequence from 0001 to 9999. It is mandatory that the leading zeros appear. So the number would be S19-0001, S19-0002 etc.

I created a field called tAccYr and set the default value as
"S" & Right(Year(Date()),2) (this works just fine)

I then created a field Called tAccNum that needs to begin with 0001 and increment by one for each new Accessioned item when I add a new record to the table.
So my first question is how can I increment tAccNum? I was thinking I could use DMax or DLast in the Default Value of the Field Properities. But can't figure that out, much less how to tell it that if the year changes (tAccYr) to start over with 0001.

Would appreciate very much some help with this.