Auto ID issue

Local time
Today, 14:20
Joined
Mar 24, 2012
Messages
6
I created a table in Access 2010 by importing from Excel 2010. I've worked in the table quite a bit and realized that I hadn't created an Autonumber ID field. It will create OK, but begins with names in the "G" alphabetically. Is that a way to force it to create an Autonumber ID in the same order as when I sort by lastname-ascending?
 
I'm sure if you search hard enough you'll find some complex, hacky way to accomplish what you want. But what's the point? What do you hope to gain from doing it this way?

It seems you understand that you need a primary key autonumber field, but you don't understand why. A primary key autonumber allows you to force your data to have a unique identifier for each row, no more no less. This allows you to reference a specific row uniquely and accurately every time.

Its not meant for tacking on additional meaning. If you want to sort your data by lastname ascending, simply add that to the SQL ('...ORDER BY lastname...') of your query (which by the way is the only place you can count on order to exist in a your database). Don't try to apply additional use or meaning to the autonumber field. What happens when someone changes their name or a record gets added? If you've built your database upon the idea that the autonumber is a sorting field your system gets hosed.
 
Well stated. It's the "anal" thing in me, I guess. Thanks
 

Users who are viewing this thread

Back
Top Bottom