Help!

How do I create a custom autonumber in Access 2003?

 
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Table Design RSS
Next:  Any help with Tab Control  
Author Message
Pat
External


Since: Nov 19, 2004
Posts: 108



PostPosted: Sun Sep 10, 2006 10:03 pm    Post subject: How do I create a custom autonumber in Access 2003?
Archived from groups: microsoft>public>access>tablesdbdesign (more info?)

I am trying to create a reporting program for our Public Safety Department
and they want the records to be automatically numbered using the format
YYMM-### (Example: first report for the month of Sept. 2006 would be 0609-001
then 0609-002. etc. and then in October 2006 it would be 0610-001).

Is this possible and if so, can you tell me how?
--
Pat
IT Trainer
Back to top
"Ken Snell
External


Since: Nov 28, 2005
Posts: 933



PostPosted: Mon Sep 11, 2006 2:57 am    Post subject: Re: How do I create a custom autonumber in Access 2003? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Use two separate fields, one for YYMM value and other for ### value. Make
the two fields a composite primary key so that unique values of the two
fields in combination will be required. You can then handle the
incrementation of the ### field using widely available code that involves
the DMax function.

You then can concatenate the two fields with the - character in queries for
display on forms and reports.
--

Ken Snell
<MS ACCESS MVP>


"Pat" wrote in message

>I am trying to create a reporting program for our Public Safety Department
> and they want the records to be automatically numbered using the format
> YYMM-### (Example: first report for the month of Sept. 2006 would be
> 0609-001
> then 0609-002. etc. and then in October 2006 it would be 0610-001).
>
> Is this possible and if so, can you tell me how?
> --
> Pat
> IT Trainer
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Table Design All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum