Why does MS Access fail to sort a date in proper order?

G

Guest

I enter data into a Ms-Access, using two fields, one for name and a second
for date. Then I select both name and date fields and click on the AtoZ
button for sorting. For some reason, it fails to sort by date the last record
I entered for a given name. Instead, it lists the record as the first for
that name but has the date out of sequence.

Help!!
 
D

Dirk Goldgar

loon guy said:
I enter data into a Ms-Access, using two fields, one for name and a
second for date. Then I select both name and date fields and click on
the AtoZ button for sorting. For some reason, it fails to sort by
date the last record I entered for a given name. Instead, it lists
the record as the first for that name but has the date out of
sequence.

Is your date field actually a date/time type of field? Or is it a text
field that you've just put a date-formatted string in?
 
J

John Vinson

On Tue, 30 Nov 2004 10:23:05 -0800, "loon guy" <loon
I enter data into a Ms-Access, using two fields, one for name and a second
for date. Then I select both name and date fields and click on the AtoZ
button for sorting. For some reason, it fails to sort by date the last record
I entered for a given name. Instead, it lists the record as the first for
that name but has the date out of sequence.

Help!!

Three suggestions:

- Don't try to sort Tables, or use table datasheet view for much of
anything except debugging.
- Create a Query based on your table; select the sort fields left to
right, first prioity sort first. Base your Form on this query rather
than on the table.
- Be sure that the date is in a Date/Time field, not Text.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Joined
Oct 3, 2011
Messages
2
Reaction score
0
Sorry, I got distracted and did not get back to you for 7 years!:drool:

The field truly is a date/time field. That is, I go to Design View in the table and it lists "Date/time" as the format under "Data Type". I understand that string fields masquerading as date fields do not sort well. I do not think that is my problem here.

I appreciate the help. Not sure we have found the problem yet. Shouldn't it be a piece of cake for Access to sort a date/time field chronologically?

Sorry if my primitive knowledge of Access is causing me to miss something fundamental!

wp
 
Joined
Oct 3, 2011
Messages
2
Reaction score
0
BTW, Access sorts the single date/time field perfectly when I have selected only that field to sort. The problem comes about when I try to sort two fields at once, one a text field and the SECOND the date/time field. Yet I have carefully used the ctrl ' shortcut to copy the content of each record in the text field precisely to the record below -- thus, I know that the entries in the sorted text field are identical.

wp
 

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