How to let the system automatically change the year (1 Viewer)

luzz

Registered User.
Local time
Today, 05:08
Joined
Aug 23, 2017
Messages
346
Hi all, I would like to ask how to let my access system know that year 2017 has end, and it is 2018 so that the year will automatically change from 2017 to 2018.

For example
Today is 31dec2017 and the PO Number show 17/1000.
Then for tmr the PO number should display 18/000 on my system.

Is this possible? If yes, how can i do that?
 

Minty

AWF VIP
Local time
Today, 12:08
Joined
Jul 26, 2013
Messages
10,354
Have you thought of using Year(Date()) or something similar?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:08
Joined
Feb 28, 2001
Messages
26,996
If your PO number is derived from ANY internal date function such as Date() or Now() then it should be automatic. With that slash that you showed, you MUST be computing this PO number via concatenation since that slash MUST be in a string and you cannot do simple math on a string without a lot of effort.

So... how DO you computer the next PO number? At the point where that computation occurs, you could change the constant of "17" to use Format(Now(), "yy") to give you 17 on 31-Dec-2017 and 18 on 1-Jan-2018.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:08
Joined
May 7, 2009
Messages
19,169
i think i made your generator and it will handle the automatic year change. unkess if course it's someone ekse code i made.
 

Users who are viewing this thread

Top Bottom