Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2007

Tip: Looking for answers? Try searching our database.

Primary Key Questions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Adam - 13 Nov 2007 17:05 GMT
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!
KARL DEWEY - 13 Nov 2007 17:13 GMT
Use a datetime field.
Signature

KARL DEWEY
Build a little - Test a little

> I have a question that I hope I can phrase simply.
>
[quoted text clipped - 12 lines]
>
> I'm sorry that this is so wordy. I hope you can help!
John Spencer - 13 Nov 2007 17:43 GMT
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?

Signature

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

>I have a question that I hope I can phrase simply.
>
[quoted text clipped - 17 lines]
>
> I'm sorry that this is so wordy. I hope you can help!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.