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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Start at



 
 
Thread Tools Display Modes
  #1  
Old September 30th, 2009, 07:23 PM posted to microsoft.public.access.gettingstarted
IfeelSilly
external usenet poster
 
Posts: 1
Default Start at

I am doing an inventory Database and I need my product id number to start at
1 but it has started off at 8. I messed up on it due to wrong info so I
started over and it picked up where I left off.
  #2  
Old September 30th, 2009, 07:26 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Start at

Why do you need the product id number to start at 1? You should never attach
any significance to the value of an Autonumber field. If its value matters
to you, you probably shouldn't be using an Autonumber field.

The only purpose of an Autonumber field is to provide a (practically
guaranteed) unique value that can be used as a Primary Key. 8, 10, 11, 12
serves that purpose just as well as 1, 2, 3, 4 does.

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


"IfeelSilly" wrote in message
...
I am doing an inventory Database and I need my product id number to start
at
1 but it has started off at 8. I messed up on it due to wrong info so I
started over and it picked up where I left off.



  #3  
Old September 30th, 2009, 07:27 PM posted to microsoft.public.access.gettingstarted
Dorian
external usenet poster
 
Posts: 542
Default Start at

Empty your table then do a compact and repair. It should reset the seed.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


"IfeelSilly" wrote:

I am doing an inventory Database and I need my product id number to start at
1 but it has started off at 8. I messed up on it due to wrong info so I
started over and it picked up where I left off.

  #4  
Old September 30th, 2009, 09:51 PM posted to microsoft.public.access.gettingstarted
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default Start at

As Doug has pointed out, if the values are significant an autonumber is not a
suitable solution. If you really do need to maintain sequential values the
only reliable way is to compute the values when a record is inserted via a
form. Roger Carlson has an example which also prevents conflicts in a multi-
user environment at:

http://www.rogersaccesslibrary.com/f...19 89c53d7ffb


and there's a slightly more complex one of mine, which additionally allows
the next number to be used to be 'seeded' at:

http://community.netscape.com/n/pfx/...g=ws-msdevapps


Ken Sheridan
Stafford, England

IfeelSilly wrote:
I am doing an inventory Database and I need my product id number to start at
1 but it has started off at 8. I messed up on it due to wrong info so I
started over and it picked up where I left off.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200909/1

  #5  
Old October 1st, 2009, 01:49 AM posted to microsoft.public.access.gettingstarted
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default Start at

If all you have is a TblProducts and you have not entered any data yet that
uses ProductID as a foreign key, then open TblProduct in design view. Delete
the field ProductID. Then reenter the field ProductID. ProductID will start
at 1 and be sequential for all the products in TblProduct.

Steve



"IfeelSilly" wrote in message
...
I am doing an inventory Database and I need my product id number to start
at
1 but it has started off at 8. I messed up on it due to wrong info so I
started over and it picked up where I left off.



  #6  
Old October 1st, 2009, 04:07 AM posted to microsoft.public.access.gettingstarted
StopThisAdvertising
external usenet poster
 
Posts: 334
Default Start at


"Steve" schreef in bericht
m...
If all you have is a TblProducts and you have not entered any data yet that uses
ProductID as a foreign key, then open TblProduct in design view. Delete the field
ProductID. Then reenter the field ProductID. ProductID will start at 1 and be sequential
for all the products in TblProduct.

Steve




--
Get lost $teve. Go away... far away....
No-one wants you here... no-one needs you here...

OP look at
http://home.tiscali.nl/arracom/whoissteve.html
(Website has been updated and has a new 'look'... we have passed 10.000 pageloads... it's
a shame !!)


For those who don't 'agree' with this mail , because $teve was 'helpfull' with his post...
We warned him a thousand times... Sad, but he is not willing to stop advertising...

He is just toying with these groups... advertising like hell... on and on... for years...
oh yes... and sometimes he answers questions... indeed...
and sometimes good souls here give him credit for that...

== We are totally 'finished' with $teve now...
== Killfile 'StopThisAdvertising' and you won't see these mails....

Arno R


 




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 03:31 PM.


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