|
 |
access thread: Starting the data base record with 1 on a AutoNumbered field after all existing records are deleted
Message #1 by "Bill Paen" <bill.paen@b...> on Thu, 26 Sep 2002 19:23:26
|
|
I have say, 50 records in an Access database. I then delete all those records. When I start to enter a new record, the Autonumber
field starts with number 51. How can I enforce it to start with 1 again?
Thanks,
Bill.
Message #2 by "John Ruff" <papparuff@c...> on Thu, 26 Sep 2002 11:36:33 -0700
|
|
After deleting the records, compact the db.
John V. Ruff - The Eternal Optimist :-)
Always Looking For Contract Opportunities
www.noclassroom.com
Live software training
Right over the Internet
Home: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
9306 Farwest Dr SW
Lakewood, WA 98498
"Commit to the Lord whatever you do,
and your plans will succeed." Proverbs 16:3
-----Original Message-----
From: Bill Paen [mailto:bill.paen@b...]
Sent: Thursday, September 26, 2002 7:23 PM
To: Access
Subject: [access] Starting the data base record with 1 on a AutoNumbered
field after all existing records are deleted
I have say, 50 records in an Access database. I then delete all those
records. When I start to enter a new record, the Autonumber field starts
with number 51. How can I enforce it to start with 1 again?
Thanks,
Bill.
Message #3 by "Hamilton. Tom" <hamiltont@s...> on Thu, 26 Sep 2002 11:44:01 -0700
|
|
Compacting the database with 0 records in an autonumbered table will
reset the autonumber to 0
Tom Hamilton
T_Systems, Inc
(xxx) xxx-xxxx
-----Original Message-----
From: Bill Paen [mailto:bill.paen@b...]
Sent: Thursday, September 26, 2002 12:23 PM
To: Access
Subject: [access] Starting the data base record with 1 on a AutoNumbered
field after all existing records are deleted
I have say, 50 records in an Access database. I then delete all those
records. When I start to enter a new record, the Autonumber field starts
with number 51. How can I enforce it to start with 1 again?
Thanks,
Bill.
Message #4 by bill.paen@b... on Fri, 27 Sep 2002 07:57:18 -0600
|
|
Thank you. It's a great help!
Bill.
-----Original Message-----
From: John Ruff [mailto:papparuff@c...]
Sent: Thursday, September 26, 2002 12:37 PM
To: Access
Subject: [access] RE: Starting the data base record with 1 on a
AutoNumbered field after all existing records are deleted
After deleting the records, compact the db.
John V. Ruff - The Eternal Optimist :-)
Always Looking For Contract Opportunities
www.noclassroom.com
Live software training
Right over the Internet
Home: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
9306 Farwest Dr SW
Lakewood, WA 98498
"Commit to the Lord whatever you do,
and your plans will succeed." Proverbs 16:3
-----Original Message-----
From: Bill Paen [mailto:bill.paen@b...]
Sent: Thursday, September 26, 2002 7:23 PM
To: Access
Subject: [access] Starting the data base record with 1 on a AutoNumbered
field after all existing records are deleted
I have say, 50 records in an Access database. I then delete all those
records. When I start to enter a new record, the Autonumber field starts
with number 51. How can I enforce it to start with 1 again?
Thanks,
Bill.
Message #5 by bill.paen@b... on Fri, 27 Sep 2002 07:58:23 -0600
|
|
Thank you, It's a great help!
Bill.
-----Original Message-----
From: Hamilton. Tom [mailto:hamiltont@s...]
Sent: Thursday, September 26, 2002 12:44 PM
To: Access
Subject: [access] RE: Starting the data base record with 1 on a
AutoNumbered field after all existing records are deleted
Compacting the database with 0 records in an autonumbered table will reset
the autonumber to 0
Tom Hamilton
T_Systems, Inc
(xxx) xxx-xxxx
-----Original Message-----
From: Bill Paen [mailto:bill.paen@b...]
Sent: Thursday, September 26, 2002 12:23 PM
To: Access
Subject: [access] Starting the data base record with 1 on a
AutoNumbered field after all existing records are deleted
I have say, 50 records in an Access database. I then delete all those
records. When I start to enter a new record, the Autonumber field starts
with number 51. How can I enforce it to start with 1 again?
Thanks,
Bill.
Message #6 by "Daniel Bailey" <maxim_ize@h...> on Fri, 27 Sep 2002 19:02:00
|
|
If You are using access 2000 compacting may not work.
I found that creating a button on a form, and placing the following in
the on_click event allows me to start at any autonumber:
CurrentProject.Connection.Execute "ALTER TABEL Table1 ALTER COLUMN
Field1 IDENTITY(1000,1)"
The first argument of IDENTITY sets the starting value, the second
argument set the increment.
Just a suggestion.
Regards,
Dan
>
I> have say, 50 records in an Access database. I then delete all those
records. When I start to enter a new record, the Autonumber field starts
with number 51. How can I enforce it to start with 1 again?
> Thanks,
> Bill.
Message #7 by "Gerald, Rand" <RGerald@u...> on Fri, 27 Sep 2002 13:22:19 -0500
|
|
This works! I use the same technique.
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: Daniel Bailey [mailto:maxim_ize@h...]
Sent: Friday, September 27, 2002 2:02 PM
To: Access
Subject: [access] Re: Starting the data base record with 1 on a
AutoNumbered
field after all existing records are deleted
If You are using access 2000 compacting may not work.
I found that creating a button on a form, and placing the following in
the on_click event allows me to start at any autonumber:
CurrentProject.Connection.Execute "ALTER TABEL Table1 ALTER COLUMN
Field1 IDENTITY(1000,1)"
The first argument of IDENTITY sets the starting value, the second
argument set the increment.
Just a suggestion.
Regards,
Dan
>
I> have say, 50 records in an Access database. I then delete all those
records. When I start to enter a new record, the Autonumber field
starts
with number 51. How can I enforce it to start with 1 again?
> Thanks,
> Bill.
|
|
 |