Link to home
Start Free TrialLog in
Avatar of aehare70
aehare70Flag for United States of America

asked on

How To - Reindex/AutoNumber Tabel In Access DB?

Is there a way to re-index an AutoNumber field in an access 2003 table?  Basically I have this table called "Events" and it uses AutoNumber type for one of its fields for the records in the table.  The AutoNumber skips around due to records being added/deleted.

The problem I am faced with is my form shows/sorts the records by AutoNumber from table Events and so now all the data is mixed up.  I want to be able to show the records on the form sorted by date bot record AutoNumber ID.
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The new Q is completely different than this Q.  Nothing vague about this Q.

mx
I could be looking at this entirely wrong, but I don't think the OP is asking to reset the Autonumber.

What it sounds like is that the OP just needs to add an ORDER BY to their recordsource of their form, to sort their data by date.

Could be wrong though.

- Anthony
Seems clear to me:

"Is there a way to re-index an AutoNumber field in an access 2003 table? "

mx
The first question in this question is:
"Is there a way to re-index an AutoNumber field in an access 2003 table? "
That may be the first question, but if you read the detail, it's clear that he simply needs to order his data.

But, that could be because of the question being edited.
If his problem is ordering his data, the fact that some Autonumbers are missing because of deletions would have not affect the ordering. The order remains the same even if records are deleted.
Yes, but he says . . .
"I want to be able to show the records on the form sorted by date bot [not] record AutoNumber ID."

- Anthony
Yes but why did he title the question: How To - Reindex/AutoNumber Tabel In Access DB?
Hey ... why not head to the new Q ...

mx
Avatar of aehare70

ASKER

Sorry for the confusion.  Yes, I wanted to know if there was a way to reindex the AutoNumber, but it seems that even if I had resolved that or reindex the AutoNumber that would not have fixed the real issue.  The real issue was the data being sorted on the form, which was answered in the other question.  Thank you for your responses, as always, it's much appreciated.
Please cancel deletion. I will award points and close.  Thanks! :p)