View Single Post
  #4  
Old May 27th, 2010, 05:02 PM posted to microsoft.public.access
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default Access 2007 with Vista

You can insert a row into the table, with a specific value for the autonumber
column by means of an 'append' query, e.g.

INSERT INTO [YourTable] ([ItemNumber], [ItemText])
VALUES(42, "Widget");

But relying on an auto number to give an uninterrupted sequence is very risky.
Its far better to automatically compute the number when a row is inserted.
Roger Carlson has simple solutions, for both single-user and multi-user
environments at:

http://www.rogersaccesslibrary.com/forum/topic395.html

and there is a more complex one of mine for use in a multi-user environment,
which also allows for the next number to be used to be 'seeded' at:

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


Ken Sheridan
Stafford, England

royfarnol wrote:
It probably is a bad idea but it has been done and it involves other
people's databases.

The Access program I run produces an item number, by way of the autonumber
function, which is then notified to several other people as a master item
number. After that each procesesses the information in their own way. When
results (or sometimes lack of results) are finalised (or exhuasted) the
report comes back under the master number.

I would rather not have to begin again as it were but reintroduce the number
that was obliterated by the power surge. I know one could issue a number of
one's own but human error then creeps in, which is why the autonumber
function was picked in the first place.

But maybe you have a better idea or a workaround solution?

Thanks, Roy.

This is a bad idea. There are a number of reasons why auto numbers may
not be contiguous and for that reason it's not advisable to use them for

[quoted text clipped - 16 lines]

Thanks, Roy.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/201005/1