Why are the individual records out of order?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been entering records in a database, and saving it when am done for a
session. When I reopen the database, I find the records are not in the order
as entered them originally. For my purposes, the order that I enter the
records is extremely important.

Why are there changes from the way I originally entered the record?
Thanks, Flip
 
Flip

Access tables are "buckets o' data", with no inherent order. Unless your
table structure includes a field on which you plan to sort, Access neither
cares nor bothers to keep track of "your" order.

Do you have a primary key field on the table? Do you have a DateEntered
field on the table?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Jeff said:
Flip

Access tables are "buckets o' data", with no inherent order. Unless your
table structure includes a field on which you plan to sort, Access neither
cares nor bothers to keep track of "your" order.

Do you have a primary key field on the table? Do you have a DateEntered
field on the table?

Regards

Jeff Boyce
Microsoft Office/Access MVP
To expand a bit on Jeff's advice, you need to create a query with the
desired fields and then select the sort order you desire to display
the data.

gls858
 
If the OP wants them in the order in which they were entered, this will only
work if he adds either an Autonumber field or event better, a WhenEntered
field that has Now() as the Default Value.
 
I wouldn't even trust an autonumber as the aren't garunteed to be sequential.
A default with Now() is a great idea as long as the records are being
manually entered one at a time. If entered by something like an import of
Excel data they still might have the same date/time stamp. If more than one
user is adding records there is always that slight possibility that more than
one record could be added at the same time.
 
Klatuu said:
If the OP wants them in the order in which they were entered, this will only
work if he adds either an Autonumber field or event better, a WhenEntered
field that has Now() as the Default Value.
True. I was assuming they were entered in such a way that one of the
fields could be sorted to provide the same order,such as alpha or customer
number or such. A bad assumption on my part.

gls858
 
Perfect! You've just identified a requirement (not an assumption)<g>

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I wouldn't even trust an autonumber as the aren't garunteed
to be sequential.

Well they are garunteed to be sequential, it's just that it doesn't
always work :~). Similarly, a problem with Now() is that it
depends on the date/time on each computer - which may be
different, or even wrong.

(david)
 
Well they are garunteed to be sequential

Unless they're set to random (which will happen if the database is
replicated)
Similarly, a problem with Now() is that it
depends on the date/time on each computer - which may be
different, or even wrong.

But at least it will be consistent for that machine! <not good, I'll agree,
in a multi-user situation>
 
Sorry: meant to include a smiley in this post (or at least indicate that I
was being picky, not disagreeing with what you were saying)
 

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

Back
Top