Help making a sequencial number generating function

Defamed

New member
Local time
Today, 09:48
Joined
Dec 12, 2012
Messages
2
Hello, long time lurker of this site now, I know you guys answered this question quite some times now, but despite all my researching for this, I couldn’t manage to do this one myself.
What I’m trying to make is a table with a function that generates a unique sequential number very much like this ES-XXXX-YYYY, where xxxx is the sequential numbering starting at 0001 and YYYY the year we’re at (2012, and it should make xxxx reset back to 0001 if the year advances). This should happen automatically each time a value is added on a different column.
Like I’ve said, I’ve been around here for quite a while, I’ve tried and read enough about the autonumber to figure it won’t work as I would like to, as I don’t want this column to be the primary key , it’s another and it’s already using autonumber, and if I happen to delete a record I wouldn’t want it to skip that value for the next input. I’ve been trying to get myself working with the DMax function which is suggested all around for databases that aren’t really that big with just a couple users, but the thing is that I know nothing about programing. I collected bits of code I found around but it evidently it just doesn’t work at all, because I’m either not placing it on the proper place or it’s just bad code because it’s just bits of code all mashed up.
If anyone wouldn’t mind spending some time helping out, I’d be thankful

I can also post the random bits of codes I got around if you’d like
 
Hello, i'm very sorry for the late reply. I've been checking both links you've sent and lost track of the time yesterday.
They've helped a whole lot, the first link was very much what i was looking for, i've just spent some time trying to edit the resulting formula and the acronyms it uses instead of bothering you for every little thing without trying first.
Thank you very much again
 
Gald to help. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom