Group:  Microsoft Access ยป microsoft.public.access.devtoolkits
Thread: Automatic Numbering

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Automatic Numbering
"Olan Gotcher" <olan[ at ]jographix.com> 23.09.2006 14:33:03
I have an old Data Base that was imported into Access. It has a membership
number that was an automatically generated. I would like to continue those
numbers but have not figured out how to have an automatically generated
number in Access start at a specified number to continue on from. My new
starting number will be 8750 and would like each new member to get a
membership number that is incremented by 1 from that point.

Thank in advance
Olan Gotcher


Re: Automatic Numbering
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 23.09.2006 19:36:40
If you can live with gaps in the numbering, and assuming you've got the
existing members in a table already, create a second table that's identical
to the existing one, but make the MembershipID an Autonumber field. Create
an Append query that takes the data from the existing table and appends it
to the new query. The next member you add to the new table will be one more
than the last number in the table.

If you can't live with gaps in the numbering, don't use an Autonumber field.
Rather, you'll have to "roll your own", by doing a DMax call to the table to
determine the current highest number, then adding one to it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Olan Gotcher" <olan[ at ]jographix.com> wrote in message
news:4515393e$0$4850$6d36acad[ at ]fe2.nntpserver.com...
[Quoted Text]
>I have an old Data Base that was imported into Access. It has a membership
>number that was an automatically generated. I would like to continue those
>numbers but have not figured out how to have an automatically generated
>number in Access start at a specified number to continue on from. My new
>starting number will be 8750 and would like each new member to get a
>membership number that is incremented by 1 from that point.
>
> Thank in advance
> Olan Gotcher
>


Re: Automatic Numbering
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 23.09.2006 21:04:03
Guess I should mention that the "gaps in the numbering" to which I referred
are going to happen if you start adding a record, and then change your mind.
Whatever number would have been used for the cancelled record is lost to
you. It's not as though you're suddenly going to move from 8750 to 9032.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> wrote in message
news:ee1vcf03GHA.2424[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
> If you can live with gaps in the numbering, and assuming you've got the
> existing members in a table already, create a second table that's
> identical to the existing one, but make the MembershipID an Autonumber
> field. Create an Append query that takes the data from the existing table
> and appends it to the new query. The next member you add to the new table
> will be one more than the last number in the table.
>
> If you can't live with gaps in the numbering, don't use an Autonumber
> field. Rather, you'll have to "roll your own", by doing a DMax call to the
> table to determine the current highest number, then adding one to it.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Olan Gotcher" <olan[ at ]jographix.com> wrote in message
> news:4515393e$0$4850$6d36acad[ at ]fe2.nntpserver.com...
>>I have an old Data Base that was imported into Access. It has a
>>membership number that was an automatically generated. I would like to
>>continue those numbers but have not figured out how to have an
>>automatically generated number in Access start at a specified number to
>>continue on from. My new starting number will be 8750 and would like each
>>new member to get a membership number that is incremented by 1 from that
>>point.
>>
>> Thank in advance
>> Olan Gotcher
>>
>
>


Re: Automatic Numbering
John Vinson <jvinson[ at ]STOP_SPAM.WysardOfInfo.com> 24.09.2006 00:06:00
On Sat, 23 Sep 2006 17:04:03 -0400, "Douglas J. Steele"
<NOSPAM_djsteele[ at ]NOSPAM_canada.com> wrote:

[Quoted Text]
> It's not as though you're suddenly going to move from 8750 to 9032.

well... you might, if you put data into the table using an Append
query. I've seen it happen but I'm not sure what causes these
occasional big gaps.

John W. Vinson[MVP]

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net