As we all know, autonumber generates despite a record being saved.
I have a small script which does generate the next job number but I need it to be a bit cleverer.
Set rst = CurrentDb.OpenRecordset("SELECT Max([JobNumber]+1) AS NextJob FROM Jobs")
If Not rst.EOF Then
JobNumber.Value = rst!NextJob
End If
What I'm looking for is to autogenerate numbers based on the year & month.
Example
PL04010001 - 04=2004 01=January 001=next ref
So in february it would start again.
PL04020001
and so on.
Can anyone help me with this task?
Thanks
I have a small script which does generate the next job number but I need it to be a bit cleverer.
Set rst = CurrentDb.OpenRecordset("SELECT Max([JobNumber]+1) AS NextJob FROM Jobs")
If Not rst.EOF Then
JobNumber.Value = rst!NextJob
End If
What I'm looking for is to autogenerate numbers based on the year & month.
Example
PL04010001 - 04=2004 01=January 001=next ref
So in february it would start again.
PL04020001
and so on.
Can anyone help me with this task?
Thanks