Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Autonumber reset


Message #1 by "Dave Burdick" <burdickdave@h...> on Wed, 11 Dec 2002 17:37:32
I recently cleaned out a table that ran up to about 75 on the incremented 
autonumber, so when the user's begin entering information again, they will 
start at 76 or so...is there a way to reset the autonumber to begin at 1 
again?
Message #2 by "Bob Bedell" <bobbedell15@m...> on Wed, 11 Dec 2002 17:56:18 +0000
with all records in table deleted, compact db






>From: "Dave Burdick" <burdickdave@h...>
>Reply-To: "Access" <access@p...>
>To: "Access" <access@p...>
>Subject: [access] Autonumber reset
>Date: Wed, 11 Dec 2002 17:37:32
>
>I recently cleaned out a table that ran up to about 75 on the incremented
>autonumber, so when the user's begin entering information again, they will
>start at 76 or so...is there a way to reset the autonumber to begin at 1
>again?


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus

Message #3 by "Gerald, Rand" <RGerald@u...> on Wed, 11 Dec 2002 12:50:29 -0600
Hi Dave,

Assuming that you have a table tblTestAutoNumber for these records with 
the
following fields:

RecordDate	Date/Time 	Format =3D ShortDate, Default =3D Date()
Sequence	Autonumber
Other Fields as desired.

You can use the following query to reset the autonumber field.  Use the 
SQL
window to create it.

ALTER TABLE tblTestAutoNumber ALTER COLUMN Sequence COUNTER (1,1);

If you compose the Primary Key as both of the first two fields 
(RecordDate
and Sequence), you will need to run this query daily, prior to ANY data
entry.

Give it a try, and let me know how it works.

Good Luck!


Rand E Gerald
Database Specialist
Information Services / Operations
Bah=E1'=ED National Office
1233 Central St.
Evanston IL 60201
(xxx) xxx-xxxx

-----Original Message-----
From: Dave Burdick [mailto:burdickdave@h...]
Sent: Wednesday, December 11, 2002 11:38
To: Access
Subject: [access] Autonumber reset

I recently cleaned out a table that ran up to about 75 on the 
incremented
autonumber, so when the user's begin entering information again, they 
will
start at 76 or so...is there a way to reset the autonumber to begin at 
1
again?
Message #4 by "Gerald, Rand" <RGerald@u...> on Wed, 11 Dec 2002 13:16:58 -0600
Further note to Dave:

Since you only have one field in the primary key, you may reset the
autonumber for an empty table using the ALTER TABLE ... SQL statement 
shown
below.

Rand E Gerald
Database Specialist
Information Services / Operations
Bah=E1'=ED National Office
1233 Central St.
Evanston IL 60201
(xxx) xxx-xxxx

-----Original Message-----
From: Gerald, Rand [mailto:RGerald@u...]
Sent: Wednesday, December 11, 2002 12:50
To: Access
Subject: [access] RE: Autonumber reset
Importance: High

Hi Dave,

Assuming that you have a table tblTestAutoNumber for these records with 
the
following fields:

RecordDate      Date/Time       Format =3D ShortDate, Default =3D 
Date()
Sequence        Autonumber
Other Fields as desired.

You can use the following query to reset the autonumber field.  Use the 
SQL
window to create it.

ALTER TABLE tblTestAutoNumber ALTER COLUMN Sequence COUNTER (1,1);

If you compose the Primary Key as both of the first two fields 
(RecordDate
and Sequence), you will need to run this query daily, prior to ANY data
entry.

Give it a try, and let me know how it works.

Good Luck!


Rand E Gerald
Database Specialist
Information Services / Operations
Bah=E1'=ED National Office
1233 Central St.
Evanston IL 60201
(xxx) xxx-xxxx

-----Original Message-----
From: Dave Burdick [mailto:burdickdave@h...]
Sent: Wednesday, December 11, 2002 11:38
To: Access
Subject: [access] Autonumber reset

I recently cleaned out a table that ran up to about 75 on the 
incremented
autonumber, so when the user's begin entering information again, they 
will
start at 76 or so...is there a way to reset the autonumber to begin at 
1
again?

Message #5 by "Dave Burdick" <burdickdave@h...> on Wed, 11 Dec 2002 20:06:11
Compact db worked out great...thanks!

> with all records in table deleted, compact db






>From: "Dave Burdick" <burdickdave@h...>
>Reply-To: "Access" <access@p...>
>To: "Access" <access@p...>
>Subject: [access] Autonumber reset
>Date: Wed, 11 Dec 2002 17:37:32
>
>I recently cleaned out a table that ran up to about 75 on the incremented
>autonumber, so when the user's begin entering information again, they will
>start at 76 or so...is there a way to reset the autonumber to begin at 1
>again?


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus

Message #6 by John Fejsa <John.Fejsa@h...> on Thu, 12 Dec 2002 09:04:04 +1100
1) Empty all records in all relevant tables.
2) if you only have a front-end databaase then
      Click Tools, Database Utilities, Compact Database
   If you have a back-end and front-end then make sure to compact the
back-end.

PS: you should compile the front-end and compact both back and front
ends before handing out your database.



____________________________________________________


John Fejsa
Systems Analyst/Computer Programmer
Hunter Centre for Health Advancement
Locked Bag 10, WALLSEND NSW 2287
Phone: (02) 4924 6336 Fax: (02) 4924 6209
www.hcha.org.au
____________________________________________________


The doors we open and close each day decide the lives we live

____________________________________________________


CONFIDENTIALITY & PRIVILEGE NOTICE

>>> burdickdave@h... 12/12/2002 4:37:32 >>>
I recently cleaned out a table that ran up to about 75 on the
incremented 
autonumber, so when the user's begin entering information again, they
will 
start at 76 or so...is there a way to reset the autonumber to begin at 1

again?

This message is intended for the addressee named
and may contain confidential information.

If you are not the intended recipient, please
delete it and notify the sender.

Views expressed in this message are those of the
individual sender, and are not necessarily the
views of Hunter Health.


  Return to Index