Scott said:
Is there any Microsoft programmers here that are willing to tell us some
secretes.
We wont tell Bill your name.
I'm not a MS programmer, but can try to explain a bit more about
physical ordering.
Surely there must be a way that Access mark's each record. Just to keep
track of it. If I index a field, lets say [name]. Then I search for
"Scott". How does Access know that the first record with "Scott" in [name]
is record 53. How does the index know?
The first record with "Scott" in [name] isn't really record 53: it's
just record 53 in the particular ordered view of the records that
you're looking at - e.g. sorted by ID. If you sorted the records by
[name] or [favourite colour], that same record might be record 125.
What confuses the issue is that, if you don't specifically ask for a
particular sort order, Access will display rows in a table in a
particular order - usually, if I remember right, ordered by the primary
key, if there is one. This default order is not the physical order of
the records as stored on disk, or the order in which the records were
entered. (although, as someone's pointed out elsewhere, if you have an
AutoNumber field, sorting by this _will_ show the order records were
entered, barring deliberate attempts to spoof this).
These two orders (physical on disk, order of time entered) are not even
necessarily the same. SQL Server is explicit about this, allowing you
to create a "clustered" index on a table, which is actually a physical
sort order. If there's a clustered index, the record you enter today
could end up close to the beginning of the table's space on disk,
depending on its values in the clustered index columns. AFAIK Access
doesn't allow you to specify the physical order of rows in a table
(anyone know better?).
The consequence, in both Access and SQL Server, is that there's no
guarantee that the last record (in the physical order on disk) was the
last entered.
You're right that there's a way Access marks each record to keep track
of it - as you say, it must do just to know where it is. But the
"where it is" has nothing to do with the order of records you see on
screen, or the order in which records were entered; and it's not
visible to any part of the Access application that we mortals outside
MS can see.
Of course you can add your own "date entered" and/or "date updated"
columns to a table, and update them whenever a record is
entered/updated - but it sounds as though it's too late for that
solution to be of any use to solve your problem. Maybe if you post
some more details of what you're trying to do, some of us here might
have some ideas?
cheers
Seb