How do I change the sort order in access to the order I put it in

G

Guest

I created an Access database and started entering in data into a form. I
wanted to keep it in the order I put it in, but Access automatically sorted
it. Is there anyway I can get it back to the order I put it in?
 
M

Mike Labosh

I created an Access database and started entering in data into a form. I
wanted to keep it in the order I put it in, but Access automatically
sorted
it. Is there anyway I can get it back to the order I put it in?

You can only do that if you originally built the table with an AutoNumber
column, or a DateTime column whose Default Value is Now().

If you did, then you can set the Record Source property of your form to a
SQL statement like this:

SELECT * FROM WhateverTableName ORDER BY WhateverColumnName

Otherwise, you will have to add a Number column to your table, enter numbers
starting from 1, to mark the records in entry order, and then change it to
an AutoNumber, (if Access will even let you do that) and then see above.
--


Peace & happy computing,

Mike Labosh, MCSD MCT
Owner, vbSensei.Com

"Veritas e aequitas; in nominae Patri, et Fili, et Spiritus Sancti."
-- The Boondock Saints
 
J

John Vinson

I created an Access database and started entering in data into a form. I
wanted to keep it in the order I put it in, but Access automatically sorted
it. Is there anyway I can get it back to the order I put it in?

A table has no meaningful order. It's best viewed as an unordered
"heap" of records. It will (generally, no guarantee) be displayed in
the order of its Primary Key field if it has one; but as a rule, if
you want to see the records in some particular order, you must create
a Query based on your table and specify the sort order there.

To retain the order in which records are entered, you must - as
suggested elsethread - put a field in the table to specify that order,
either an Autonumber or a date/time stamp defaulting to Now(). If you
already have records and do not have such a field, there's no way I
can think of for Access to "remember" what order they were entered.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top