Well, I created a unique Notice Number using the Now function in a date field formatted as yymmddhhmmss. This produced Notice Numbers like 061215115742 or 061218081236. However, mgmt thinks the number is too long. They want to go back to the numbering scheme used when the program was written for Dataflex: yyyynnn, where yyyy = current year and nnnn = record number. (They enter 400 records/year max.)
So I'm looking for some help to code this in a way where no maintenance will be required. IOW, when the new year rolls around the Notice Number would automatically reset itself. For example, on 1-1-07 it would reset from, say, 2006335 to 2007001.
I think I can manage the yyyy part, but I'm not sure how to produce the nnn and also get it to reset for a new year.
Is there a VBA expert who can help me write code that uses the current year & record count to produce the Notice Number, and also automatically resets itself in a new year?
Thanks in advance,
Kerry
So I'm looking for some help to code this in a way where no maintenance will be required. IOW, when the new year rolls around the Notice Number would automatically reset itself. For example, on 1-1-07 it would reset from, say, 2006335 to 2007001.
I think I can manage the yyyy part, but I'm not sure how to produce the nnn and also get it to reset for a new year.
Is there a VBA expert who can help me write code that uses the current year & record count to produce the Notice Number, and also automatically resets itself in a new year?
Thanks in advance,
Kerry