View Full Version : Table AutoNumbering Problem


cherosoullis
07-06-2006, 04:47 AM
I have some data that I import them to Access into a predefined table. The first colum of this data is A/A (lets say from 1-500). I do this in order to validate some data. The problem is that when I want to delete one row (lets say row 99) then the numbering is left as it is (.....97, 98, 100, 101.....). It ignores the fact that number 99 is missing. I want when I delete one record to start recounting from the begining (1-499).
I want the same thing when I enter a new value in the table. Lets say to enter a raw in the meddle of the table (lets say in position 65) to change the entire countin of the first column.

Thanks in advance.

neileg
07-06-2006, 05:04 AM
That's not how autonumbers work. Plus that's not how tables work!

Autonumbers are really intended to provide a unique record reference. You cannot guarantee that there are no gaps in a sequence of autonumbers, so using them for a field that has a particular meaning is a problem.

There is no intrinsic order in a table, so the position of any given record is irrelevant. Inserting a row in the middle of a table has no meaning. If position is important to you, you will need to have a field that gives you this position information.

Why are you doing this? We may be able to solve the problem a different way.

cherosoullis
07-06-2006, 11:23 AM
I have some date in a text form and in order to validate them I am importing them into Access table where I use some creteria to and is in a more readable form. The data goes like this:
1;12345;;HL;123;TRUE;ATHENS;
2;12345;12;IM;123;FALSE;PARIS;

Those date are entered into access and are validate and were there is an error is shown on the importation of the file automatically.
The only problem is with the first column that is the A/A.
When I make a correction by deleting one row or incerting one column I have to start from there that I made the importatin or deletion of the row and correct accordingly the numbers below this. Meaning that if I make a deletion in row 99 from the table of 500 rows then I have to change the first row numbering from 99 and after for the rest 400. Is there any whay this to be done automatically?

Thanks again.

neileg
07-07-2006, 01:04 AM
Yes, I understand what you want, but why do you want to do this? There is no standard function in Access to do what you want. It is easy to allocate a sequential number in a report, not easy in a table.

cherosoullis
07-07-2006, 02:39 AM
The reason that I want to do this is that after I validate the data and correct them I export the file to its original format. As far as I know I cannot export a I cannot export this report to its original format as a Delimited format. Thats why I wanted to make this correction in the table.

cherosoullis
07-09-2006, 06:23 AM
Any help pls on this issue?

RuralGuy
07-09-2006, 09:37 AM
Maybe this is the function for which you are looking.http://www.lebans.com/rownumber.htm

cherosoullis
07-09-2006, 10:31 PM
Thanks for your reply.

It wasnt what I was looking for but this will work just fine also. I will make some adjustment on my database and make it Work with this.

Again thanks for your replies.