By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,509 Members | 2,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,509 IT Pros & Developers. It's quick & easy.

Numbering the records serially

P: 1
I have a db file with about 13,000 records. For some reason or other I neglected giving serial numbers at the outset. Now I need them for analysis purpose.

Is there any way to give the Number serially after I sort the records in the fashion I want. Any quick way through Update Query?
Jul 23 '07 #1
Share this Question
Share on Google+
2 Replies


missinglinq
Expert 2.5K+
P: 3,532
If you mean to assign, in a table, an ID-type number based on the record's postion after sorting. this begs the question 'what will you do if you then have to add a record/edit a record' and the sort order changes? A little more explanation of exactly what you're trying to accomplish would help us help you.

If you simply need to identify the postion of a specific record in the recordset after sorting,

Me.CurrentRecord

will give you that information.

Welcome to TheScripts!

Linq ;0)>
Jul 23 '07 #2

FishVal
Expert 2.5K+
P: 2,653
I have a db file with about 13,000 records. For some reason or other I neglected giving serial numbers at the outset. Now I need them for analysis purpose.

Is there any way to give the Number serially after I sort the records in the fashion I want. Any quick way through Update Query?
Hi!

I can suggest you the following.
  • You can just add Autonumber field to your table, but the records will be numerated in the order of creating, sorting will be useless
  • If you anyway want to sort records prior to numeration, then create a new table with the same fields as in the table you have and additional Autonumber field, and use append query to add sorted records to the new table
Jul 23 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.