Miranda, your posted data is inconsistent. I'll assume for now that the August items, like the September ones, will contain four digits rather than three. It is critical (much easier) for the data to be consistent if you want to sequence your data within each month.
You don't specify, but I'm guessing you want this value to be created for you on a form for when entering a new record?
PS. Actually Steven's post handles pretty well everything well. Key layout would be much better as he suggests. I would consider using the
Form_BeforeInsert event though. It is actually not quite correct to show the value before it is created for two reasons :
- Logically, the value has not yet been assigned. It is only a best-guess at this stage, and makes little sense to show this to the operator.
- It is also possible that the record addition will be cancelled or delayed. Until the record is saved there is a very real potential for the same value to be assigned to another record (which would not be good).
If it is important for the operator to make a note of the value assigned then a
MsgBox() with the information could be displayed within the
Form_AfterInsert event procedure, always assuming that's even necessary. Newly added records are often (not always) visible on the same form.