A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Autonumber



 
 
Thread Tools Display Modes
  #1  
Old April 26th, 2004, 11:48 AM
Brian C
external usenet poster
 
Posts: n/a
Default Autonumber

I was trying to add a first record to a table called
BOOKING with the primary key defined as AUTONUMBER. I made
a mistake because I needed to put a dummy record in
another table first so no record was added. However when I
then went into the BOOKING table to add the record it was
added with the field set to 2. ACCESS must be saving this
number somewhere and not reseting it if the record is not
added.

How can I reset this value so that the record when added
is given the value 1.

Thanks in advance.

  #2  
Old April 26th, 2004, 05:33 PM
Tim Ferguson
external usenet poster
 
Posts: n/a
Default Autonumber

"Brian C" wrote in
:


How can I reset this value so that the record when added
is given the value 1.



You can reset an empty table by compacting and repairing the database. If
there are records in it, though, then you can't (and wouldn't want to) go
back over used numbers.

Remember the Autonumber Commandment: "If you care what value an Autonumber
has, then you probably should not be using an Autonumber"

B Wishes


Tim F

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.