Autonumber restart yearly

cherosoullis

Registered User.
Local time
Today, 21:43
Joined
Jun 23, 2006
Messages
47
Here what I want to do. I want to use the autonumber facility which will restart by itself yearly in the following way.
1/2004
2/2004
3/2004
4/2004
.
.
1/2005
2/2005
3/2005
4/2005

Can you help me on this please?
 
Autonumber is not the way to go as it will not start over. What, exactly, are you trying to accomplish with this anyway? I am thinking that there is likely a better way of doing it, but without more information I can't even begin to go there.
 
what you can do is get new number
this new number is stored in a table and basically it looks at this number in your form assigns this nubmer and then updates the table number by adding 1

this would allow you then to reset the numbering back to whatever
now the purists will say why - (I kinda agree with them but understand that sometimesyou need to deviate from th golden path of rightousness) (bound to be a couple of typos in there)

this would allow you to do yearly numbering
I used to do it the other way round
year-number - but it makes no difference

personally i would have continous numbers and just change the year at the end and live with the auto numbering if you can

the benefit of get next number function (Check the samples for the coding- its where I got it) is that you can close your gaps up so you don't get gaps

downside auditors - will look at this and if they know their onions would prefer to have the autonumber as well and look at both if their are gaps in your autonumbers and gaps in your getnumbersfield then they might get a bit suspecious

Access autonuber rarely goes tits up , the numbering function (Which i used in another company) went wrong maybe 10 times in 7 years and each time it did I just wrote a littel audit note confirming when I reset numbers and why

auditors came and check asked about gaps pulled my file out and they were happy as larry ( might of been lucky though cos' the auditor was an access fan) he love it knew its its strenghts and its weakness
 
I have an archives of projects done by my section that requires an id for each project for each year (2000601, 2000602, etc) So I created a query that creates my new id:

SELECT DISTINCT Year(Now()) AS YYear, Right([YYear],4) AS code, Max([Project No]) AS Num, IIf(
Code:
=Left([num],4),[num]+1,[code]+"001") AS [New Num]
FROM Projects;

Dave
 
Auto number to start new yearly

I do have a similar problem.
My data base has Autonumber field and Date field which is set to =Date () to insert the current date. Is there any VB code for the autonumber field to look up in the Date field and if the date is 1st Jan, it should start numbering from 1? Shall be grateful for help.
 
I do have a similar problem.
My data base has Autonumber field and Date field which is set to =Date () to insert the current date. Is there any VB code for the autonumber field to look up in the Date field and if the date is 1st Jan, it should start numbering from 1? Shall be grateful for help.
Forget about autonumber, it won't do what you want. Do a search in these forums on creating your own sequential numbers using DMax().
 
I do have a similar problem.
My data base has Autonumber field and Date field which is set to =Date () to insert the current date. Is there any VB code for the autonumber field to look up in the Date field and if the date is 1st Jan, it should start numbering from 1? Shall be grateful for help.

BTW, if you really have a field called [Date], you should change its name to [TheDate] or something, as 'Date' is also used for a function call, which can create REALLY bizarre behavior if you were to vba program in certain ways.
 

Users who are viewing this thread

Back
Top Bottom