Fields Don't Match

A

AIR1

One field, the primary key, was indexed or sorted into a different order. The
other fields in the table, however, did not change along with it. Now I have
a lot of records tied to the wrong primary key. For example, I had as the
primary key
Primary Project
A26 1
A27 2
And after the sort/index, I now have something like this:
A27 1
A26 2

Does anyone know why the other fields did not accompany the primary key?
 
R

Rick Brandt

AIR1 said:
One field, the primary key, was indexed or sorted into a different order. The
other fields in the table, however, did not change along with it. Now I have
a lot of records tied to the wrong primary key. For example, I had as the
primary key
Primary Project
A26 1
A27 2
And after the sort/index, I now have something like this:
A27 1
A26 2

Does anyone know why the other fields did not accompany the primary key?

Are you sure you didn't remove an AutoNumber field and then add a new one back?
That would cause the rows to be renumbered. Applying an index or sort would not
do that.
 
A

AIR1

We never used Autonumber. But, we did change the primary key, changing it
from a a single digit number that resembled an autonumber, that is, 1,2,3...
to a number/letter combination AC1, for example. When AC1 became the primary
key, the fields sorted based on it and this sort created the field mix-up.
 
R

Rick Brandt

AIR1 said:
We never used Autonumber. But, we did change the primary key, changing it
from a a single digit number that resembled an autonumber, that is, 1,2,3...
to a number/letter combination AC1, for example. When AC1 became the primary
key, the fields sorted based on it and this sort created the field mix-up.

Database tables are not like spreadsheets. You cannot change the ordering of
any single column without all of the other columns "coming along for the ride".
Either your table is corrupted in a manner that I have never seen nor heard of
or "something else" happened besides what you are describing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top