View Single Post
  #15  
Old June 4th, 2010, 04:24 PM posted to microsoft.public.access
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default Two autonumber fields in one table possible?

Sharon:

One thing worth adding to John's reply is that if the database is in a multi-
user environment, and two or more users could be adding a new record of the
same category simultaneously, this would give rise to a conflict as both
would get the same new number. If the category and serial number columns are
the composite primary key of the table, or otherwise indexed uniquely
(together not individually), which they should be, an error would occur when
the second user trying to save the record does so as this would violate the
index.

Roger Carlson has a simple solution to this at:

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

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

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


Both of these are for a single sequence of numbers, however, so for two
sequences some modification would be needed. If you need help to implement
either of these in the context of your database post back.

Ken Sheridan
Stafford, England

Sharon_wv wrote:
Ken & Jeff -
I totally understand your logic for wanting me to stop. However, let me
give you more details about the records that we will be capturing. With each
record, there will be a corresponding file (many binders, etc.) that go along
with the record. These binders, etc. will be filed in a large library
according to their tracking numbers. Each track of hard copy records, if my
plan for numbering works, will be filed in different areas. In order to make
finding records easier, I was hoping to assign sequential tracking numbers
for each track of records (Category A and Category B). So it wasn't just for
counting purposes, but for overall organizational purposes of both physical
records and digital records. BUT, I suppose that assigning the A-xxxx vs.
B-xxxx will do just that as well, without having to violate the integrity of
a database. I can also just assign the numbers to each record after entering
all the data as well, instead of having Access do it for me. Once I have
them all logged in Access, it will be simple to do something like that.

I really really really appreciate your expertise in leading me in the right
direction, gentlemen! So sorry to take up so much of your valuable time!!

Sharon

As Jeff says the key question here is why? As the numbers are, like a true
autonumber, arbitrary, it's difficult to see what purpose they fulfil. The

[quoted text clipped - 57 lines]

.


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