AutoIncrement (Sort of)

screwsoft

Registered User.
Local time
Today, 03:32
Joined
Nov 18, 2003
Messages
10
I have a field in a table that is an order number of the from yy/xx where yy is the year and xx is an incremental number starting from 01.

For example the first order this year was 03/01 and I am currently on 03/63, however I am currently inserting these details manually.

Does anybody know of any way I can get these entered automatically when creating a new record?

By the way the year is financial so 03 changes to 04 on 1 April not 1 January.

Hope somebody can help
 
I'd build a function which generates the desired string (on the fly so to speak) which then is used as the record index.

Your function would rollover the ficsal year and restart the numbers as desired.
 
Any offers om the function?
 
Why not split the reference and get the year part from the current date, and use DMax on the other number and add 1. You can then concatenate the results for display purposes.
 
I'm afraid I'm a complete novice and iliiterate when it comes to VBA code can anybody point me in the right direction with this function.
 
Unfortunately not close enough for my very limited VBA skills, thanks anyway.
 

Users who are viewing this thread

Back
Top Bottom