recreating an autonumber field
From: Jake Peters (petershj_at_mts.net)
Date: 06/08/04
- Next message: Fred Boer: "Controlling numbers in Multiselect Listboxes.."
- Previous message: Marshall Barton: "Re: Locking edits on a form"
- Next in thread: Marshall Barton: "Re: recreating an autonumber field"
- Reply: Marshall Barton: "Re: recreating an autonumber field"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Jun 2004 13:59:02 -0500
I currently do this so i can link a table with a query that contains the
same values only one record lower relative to the autonumber. So in the
table 1=A, 2=B, 3=C... and in the query 2=A, 3=B, 4=C... etc. I do this in
order to perform some calculations i need (by using a third query to compare
the two, and storing that value in a generated field). The reason i have to
recreate the autonumber is because records get added/deleted. So if i were
to leave it the generated value i use for linking (Autonumber+1) would not
work. This is because Autonumber does not reuse deleted numbers, so the
generated query number can create an unlinkable value. For instance if the
fourth record got deleted from the table:
Table Query
1=A 2=A
2=B 3=B
3=C 4=C
5=E 6=E
The query would still generate a record number of 4, as it is based on the
one "beside" it, but there is no 4 in the table.
My question is, are there any draw backs to recreating an autonumber field?
Or is there a different method of linking or looking up the previous record
and using its value and the current one? Or is all of this alright?
thx
- Next message: Fred Boer: "Controlling numbers in Multiselect Listboxes.."
- Previous message: Marshall Barton: "Re: Locking edits on a form"
- Next in thread: Marshall Barton: "Re: recreating an autonumber field"
- Reply: Marshall Barton: "Re: recreating an autonumber field"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|