Creating an incremental number based on calendar year

J

Joseppi4Life

I have a database (tblInvestigations) that I must include a inciden
number based on the current year. The difficulty I'm having i
figuring out how to
1) automaticallly increment the incident number (IncidentID); an
2) store and format the Year (IncidentYr) to only show the last tw
digit

The final product should look like 05-0001, 05-0002... On Jan 01 2006
it needs to restart numbering to 06-0001, 06-0002 without changing th
previous year's entries. As I only store this info for 5 years,
will never run into the issu of having duplicate years.

Any help would be greatly appreciated
 
B

BruceM

When somebody offers a suggestion it is considered good form to acknowledge
it. We are all volunteers here.
 
J

Joseppi4Life

Bruce

Sorry for not responding sooner. I didn't get a notification that m
post had been answered. Your solution works like a charm!! I'l
definitely let you know whether I have any other issues with this

Again many thanks!! :D

Joseppi4Lif
 
B

BruceM

Glad to hear it worked. As it happens I have answered similar questions
three or four times, and had not until now received a response. I was
frustrated because I offered what I thought was a good suggestion, but was
receiving no feedback (from anybody) as to whether it had worked. You
happened to bear the brunt of that frustration, that's all. Good luck with
your project.
 
J

John Vinson

Glad to hear it worked. As it happens I have answered similar questions
three or four times, and had not until now received a response. I was
frustrated because I offered what I thought was a good suggestion, but was
receiving no feedback (from anybody) as to whether it had worked.

Just FWIW, Bruce - I've been answering questions here for years, and
I've become inured to this. I'll typically get one acknowlegement for
every twenty or thirty responses, if that. I just have to assume that
if the OP doesn't come back with further questions, that they've
solved their problem.

John W. Vinson[MVP]
 
B

BruceM

John,

Thanks for your observation. Usually I just let it go, but my curiosity on
this one point was starting to get to me. Silly me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top