PC Review


Reply
Thread Tools Rate Thread

AutoNumber reset

 
 
=?Utf-8?B?dGZsZXR0?=
Guest
Posts: n/a
 
      23rd Jul 2007
Does anyone know how to reset the autonumber back to 0 or 1??
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      23rd Jul 2007
Delete all records.
Then compact the database (Tools | Database Utilities.)

If you need to reset it programmatically:
http://allenbrowne.com/func-ADOX.html#ResetSeed

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"tflett" <(E-Mail Removed)> wrote in message
news:1E70A2F0-D1BA-4448-AE43-(E-Mail Removed)...
> Does anyone know how to reset the autonumber back to 0 or 1??

 
Reply With Quote
 
=?Utf-8?B?dGZsZXR0?=
Guest
Posts: n/a
 
      23rd Jul 2007
Thank you

"Allen Browne" wrote:

> Delete all records.
> Then compact the database (Tools | Database Utilities.)
>
> If you need to reset it programmatically:
> http://allenbrowne.com/func-ADOX.html#ResetSeed
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "tflett" <(E-Mail Removed)> wrote in message
> news:1E70A2F0-D1BA-4448-AE43-(E-Mail Removed)...
> > Does anyone know how to reset the autonumber back to 0 or 1??

>

 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      23rd Jul 2007
Allen provided pointers to "how to".

Now, ?why? I'm not asking out of simple curiosity. Frequently folks try to
use Access Autonumbers to mean something (e.g., "a sequence number", an
"invoice number", ...).

Access Autonumbers are intended to be used as unique row identifiers, and
are generally unfit for human consumption. Why do you care what value the
autonumber is?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"tflett" <(E-Mail Removed)> wrote in message
news:1E70A2F0-D1BA-4448-AE43-(E-Mail Removed)...
> Does anyone know how to reset the autonumber back to 0 or 1??



 
Reply With Quote
 
=?Utf-8?B?dGZsZXR0?=
Guest
Posts: n/a
 
      23rd Jul 2007
After testing my DB, I would like to reset the autonumbers back to 1 when
entering new data. My sutonumber is being used to keep track of clients in
the DB.

"Jeff Boyce" wrote:

> Allen provided pointers to "how to".
>
> Now, ?why? I'm not asking out of simple curiosity. Frequently folks try to
> use Access Autonumbers to mean something (e.g., "a sequence number", an
> "invoice number", ...).
>
> Access Autonumbers are intended to be used as unique row identifiers, and
> are generally unfit for human consumption. Why do you care what value the
> autonumber is?
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
> "tflett" <(E-Mail Removed)> wrote in message
> news:1E70A2F0-D1BA-4448-AE43-(E-Mail Removed)...
> > Does anyone know how to reset the autonumber back to 0 or 1??

>
>
>

 
Reply With Quote
 
=?Utf-8?B?c3RldmVhdGRi?=
Guest
Posts: n/a
 
      23rd Jul 2007
I would try using a different method to increment in this case to keep
everything in same order the problem with using autonumber for tracking
clients is that it can turn out to be random. You can not be certain that you
will be given numbers in order as in 1,2,3,4... it may jump from
4,5,6,8692003,7,8.

"tflett" wrote:

> After testing my DB, I would like to reset the autonumbers back to 1 when
> entering new data. My sutonumber is being used to keep track of clients in
> the DB.
>
> "Jeff Boyce" wrote:
>
> > Allen provided pointers to "how to".
> >
> > Now, ?why? I'm not asking out of simple curiosity. Frequently folks try to
> > use Access Autonumbers to mean something (e.g., "a sequence number", an
> > "invoice number", ...).
> >
> > Access Autonumbers are intended to be used as unique row identifiers, and
> > are generally unfit for human consumption. Why do you care what value the
> > autonumber is?
> >
> > Regards
> >
> > Jeff Boyce
> > Microsoft Office/Access MVP
> >
> > "tflett" <(E-Mail Removed)> wrote in message
> > news:1E70A2F0-D1BA-4448-AE43-(E-Mail Removed)...
> > > Does anyone know how to reset the autonumber back to 0 or 1??

> >
> >
> >

 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      23rd Jul 2007
By "keep track of clients", do you mean count them? Remember, Autonumbers
will (eventually) not be sequential, and can be (set to) random.

Do you mean "related a client in one table to that client's 'child' records
in another table"? If so, does it matter if the ID is 1 or 191?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"tflett" <(E-Mail Removed)> wrote in message
news:09404905-A7B5-4B18-8DF5-(E-Mail Removed)...
> After testing my DB, I would like to reset the autonumbers back to 1 when
> entering new data. My sutonumber is being used to keep track of clients
> in
> the DB.
>
> "Jeff Boyce" wrote:
>
>> Allen provided pointers to "how to".
>>
>> Now, ?why? I'm not asking out of simple curiosity. Frequently folks try
>> to
>> use Access Autonumbers to mean something (e.g., "a sequence number", an
>> "invoice number", ...).
>>
>> Access Autonumbers are intended to be used as unique row identifiers, and
>> are generally unfit for human consumption. Why do you care what value
>> the
>> autonumber is?
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Office/Access MVP
>>
>> "tflett" <(E-Mail Removed)> wrote in message
>> news:1E70A2F0-D1BA-4448-AE43-(E-Mail Removed)...
>> > Does anyone know how to reset the autonumber back to 0 or 1??

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?dGZsZXR0?=
Guest
Posts: n/a
 
      23rd Jul 2007
I would like to count all the clients being entered in the db for percentages
purposes. My autonumber is my PK and is being used to link other tables
together. I guess it doesn't matter what the autonumber is. So I take it
all other autonumbers in the db won't matter as long as the relationships are
correct?

"Jeff Boyce" wrote:

> By "keep track of clients", do you mean count them? Remember, Autonumbers
> will (eventually) not be sequential, and can be (set to) random.
>
> Do you mean "related a client in one table to that client's 'child' records
> in another table"? If so, does it matter if the ID is 1 or 191?
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
> "tflett" <(E-Mail Removed)> wrote in message
> news:09404905-A7B5-4B18-8DF5-(E-Mail Removed)...
> > After testing my DB, I would like to reset the autonumbers back to 1 when
> > entering new data. My sutonumber is being used to keep track of clients
> > in
> > the DB.
> >
> > "Jeff Boyce" wrote:
> >
> >> Allen provided pointers to "how to".
> >>
> >> Now, ?why? I'm not asking out of simple curiosity. Frequently folks try
> >> to
> >> use Access Autonumbers to mean something (e.g., "a sequence number", an
> >> "invoice number", ...).
> >>
> >> Access Autonumbers are intended to be used as unique row identifiers, and
> >> are generally unfit for human consumption. Why do you care what value
> >> the
> >> autonumber is?
> >>
> >> Regards
> >>
> >> Jeff Boyce
> >> Microsoft Office/Access MVP
> >>
> >> "tflett" <(E-Mail Removed)> wrote in message
> >> news:1E70A2F0-D1BA-4448-AE43-(E-Mail Removed)...
> >> > Does anyone know how to reset the autonumber back to 0 or 1??
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      23rd Jul 2007
On Mon, 23 Jul 2007 09:46:08 -0700, tflett <(E-Mail Removed)>
wrote:

>After testing my DB, I would like to reset the autonumbers back to 1 when
>entering new data. My sutonumber is being used to keep track of clients in
>the DB.


What Jeff is saying is... let the autonumber keep track of clients, *behind
the scenes and under the hood*. Neither you nor your users should care whether
a client is number 3, or 318, or -225104225. The ONLY purpose of the
autonumber is to provide a unique key for linking tables within your
application; they're not suitable for human consumption.

John W. Vinson [MVP]
 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      23rd Jul 2007
If you have the relationships set (e.g., one-to-many, using a foreign key
field in the many side table that points back to the {?autonumber} primary
key in the one side table), it won't matter.

If you want a count of rows in ANY table, use a Totals query (or the
DCount() function).

That way, it won't matter how many gaps are in the Autonumber (primary key)
sequence (and there will be!), you can still count how many.

Regards

Jeff Boyce
Microsoft Office/Access MVP


"tflett" <(E-Mail Removed)> wrote in message
news:576ABEA5-5876-44A3-A5A2-(E-Mail Removed)...
>I would like to count all the clients being entered in the db for
>percentages
> purposes. My autonumber is my PK and is being used to link other tables
> together. I guess it doesn't matter what the autonumber is. So I take it
> all other autonumbers in the db won't matter as long as the relationships
> are
> correct?
>
> "Jeff Boyce" wrote:
>
>> By "keep track of clients", do you mean count them? Remember,
>> Autonumbers
>> will (eventually) not be sequential, and can be (set to) random.
>>
>> Do you mean "related a client in one table to that client's 'child'
>> records
>> in another table"? If so, does it matter if the ID is 1 or 191?
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Office/Access MVP
>>
>> "tflett" <(E-Mail Removed)> wrote in message
>> news:09404905-A7B5-4B18-8DF5-(E-Mail Removed)...
>> > After testing my DB, I would like to reset the autonumbers back to 1
>> > when
>> > entering new data. My sutonumber is being used to keep track of
>> > clients
>> > in
>> > the DB.
>> >
>> > "Jeff Boyce" wrote:
>> >
>> >> Allen provided pointers to "how to".
>> >>
>> >> Now, ?why? I'm not asking out of simple curiosity. Frequently folks
>> >> try
>> >> to
>> >> use Access Autonumbers to mean something (e.g., "a sequence number",
>> >> an
>> >> "invoice number", ...).
>> >>
>> >> Access Autonumbers are intended to be used as unique row identifiers,
>> >> and
>> >> are generally unfit for human consumption. Why do you care what value
>> >> the
>> >> autonumber is?
>> >>
>> >> Regards
>> >>
>> >> Jeff Boyce
>> >> Microsoft Office/Access MVP
>> >>
>> >> "tflett" <(E-Mail Removed)> wrote in message
>> >> news:1E70A2F0-D1BA-4448-AE43-(E-Mail Removed)...
>> >> > Does anyone know how to reset the autonumber back to 0 or 1??
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autonumber reset Francois Microsoft Access 1 30th May 2008 12:36 PM
Reset AUTONUMBER =?Utf-8?B?ZWxk?= Microsoft Access Reports 5 24th Feb 2007 12:42 PM
AUTONUMBER reset =?Utf-8?B?U2NvdHQgQnVya2U=?= Microsoft Access VBA Modules 7 20th Feb 2007 09:00 AM
autonumber reset again =?Utf-8?B?RnJlZCBCYWx0dXM=?= Microsoft Access VBA Modules 8 5th Feb 2007 09:45 PM
How do I reset the autonumber to 1? =?Utf-8?B?Y2hleWFubmU=?= Microsoft Access Queries 1 10th Oct 2006 09:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:50 PM.