Primary Key Questions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a question that I hope I can phrase simply.

I have started to record all the compliments that my company receives. Now
some of these compliments arrived in 2006 and some arrived in 2007. One of my
fields is called Compliment Number, and, as you've guessed this is an
autonumber column which automatically assigns a number to compliments as I
add them. HOWEVER, I wasn't given the compliments in chronological order. I
entered some 2007 compliments yesterday and some 2006 compliments today.
Therefore some of my 2007 compliments have compliment numbers like 2 and 12
whereas some of my 2006 compliments are 56 and 60. I'd like to change this in
the table. I'd like to be able to open the table with the earliest compliment
having Compliment No 1 in, the next earliest having Compliment No 2. Is it
possible to change the Primary Key in this way? Could someone tell me how?
I'm a new user.

I'm sorry that this is so wordy. I hope you can help!
 
Add another field to your table to record the date of the compliment. If
you cannot do that then add a number field to your table ( I would use type
double). You can enter number in this field to specify sort order. Then if
you need to add a new record between 1 and 2 all you need to enter in the
number field is 1.5 and the records can still be sorted in the desired
order.

The date field is probably a better option if you can use it. You have
already run into the problem where you are not necessarily entering the
records in the order of the compliment being received but in the order they
arrive on your desk. Do you really want to have to re-number all the
records each time you find a new record to enter that is out of sequence
with the records that already are in the database?

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top