Sort Table by Date

depawl

Registered User.
Local time
Today, 06:17
Joined
May 19, 2007
Messages
144
I have a Table that is used to collect data from client’s phone calls. There is a field for the Client’s name and another for the date the client called (There are a whole lot more fields, but for simplicities sake let’s focus on these two). I have sorted the table on date and indexed the date field. I need to add a “RECORD NO.” field in order to get some queries to run correctly. This field will be autonumber. I would like to have the RECORD NO. field to run in conjunction with the date, that is RECORD. NO. 1 would be the earliest date in the table and the last RECORD NO. would be the most recent date that a client called in. I have verified that the table is sorted by date, but when I add the RECORD NO. field the table reverts to sorting alphabetically by client’s name. The client’s name field is not indexed. I can’t figure out why it is doing this. Any ideas or suggestions as to how to correct this?
Thanks.
 
You can't actually sort a table, you only sort a view of the table, the underlying data is unsorted.

To achieve what you want, try this. Create a backup copy of your database. If losing the data or the database would make you cry, make multiple backups! Create a new empty table that is the exact duplicate of the structure of the current table (use copy and paste structure only). Add the new autonumber field. Ctreate a query based on the old table and apply the sort in the query. Append this data to the new table. Delete the old table.
 
Thanks neileg:
I kind of knew I had to do something like that but wasn't exactly sure of the steps. Your advice was right on the money.
depawl
 

Users who are viewing this thread

Back
Top Bottom