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
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