This is just one suggestion of many that come to mind but here goes ...
Add a table to your database and lets call it (at least for now, you can call it whatever you like) TempCnt. Now this table will have three number fields (Y, M, Cnt).
What you would do is something like ...
'open recordset pessimistic locking
'this table will only contain one record at all times
'check year to see if it is current against system time
'check month to see if current against system time
'if neither year or month is correct based upon system time then update record with correct year, month, and reset cnt to 1
'else if everything is current then retrieve value and update record with new value...
[tt]
SomeVariable = Rs.Fields("Cnt"

.Value + 1
'if dao/rdo then rs.edit else no need
Rs.Fields("Cnt"

= Rs.Fields("Cnt"

+ 1
Rs.Update
Rs.Close
[/tt]
so then you would be able to do what ever you needed to do with the retrieved information.
As you can see the Cnt field in the above psuedo code is the last used number and not the next available number for that date.
Good Luck