Sequential Annual Coding for Customers in Access
In this video, I'm going to show you how to assign a code to each customer that's based on a sequential number according to the year they were added to your database. So for example, you'll have 2022-0001, 2022-0002, 2022-0003, and so on. When 2023 rolls around, the counting starts over: 2023-0001, etc.
Sandra from Norfork, Arkansas (a Gold Member) asks: I'm a pug breeder. For each litter, the pup is given a number, for example 22-001 is the first pup of the year 2022. I can't figure out how to make the sequential numbering work for this format of year they are born (WhelpDate) and the sequence they are born. Can someone help?
Update
- A few people have mentioned to me that if you go back and delete one of the previous records from that year, then the count is wrong. Yes. That will happen. That's one of the reasons why I always say Don't Delete Data! But if you're going to not listen to me, then use DMax instead, and you'll have to wrap that in an Nz function if none exist. That's again, why I say Don't Delete Data!
Pre-Requisites
Recommended Courses
Links

Keywords
access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, #fasttips, incremental number, counter value, dcount, incrementer, sequential, counter based on year, annual counter, date based counter