PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?bG9vbiBndXk=?=
Guest
Posts: n/a
 
      30th Nov 2004
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!!


 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      30th Nov 2004
"loon guy" <loon (E-Mail Removed)> wrote in message
news:3367AB35-B74B-4DD8-8D61-(E-Mail Removed)
> 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?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      30th Nov 2004
On Tue, 30 Nov 2004 10:23:05 -0800, "loon guy" <loon
(E-Mail Removed)> wrote:

>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
 
Reply With Quote
 
New Member
Join Date: Oct 2011
Posts: 2
 
      3rd Oct 2011
Sorry, I got distracted and did not get back to you for 7 years!

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
 
Reply With Quote
 
New Member
Join Date: Oct 2011
Posts: 2
 
      3rd Oct 2011
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refined Sort - Sort within a Sort Bishop Microsoft Excel Programming 0 7th Apr 2009 09:00 PM
why does synchronization fail in access 2007 =?Utf-8?B?SWFu?= Microsoft Access 10 9th Mar 2007 08:48 AM
why why why why why Mr. SweatyFinger Microsoft ASP .NET 4 21st Dec 2006 02:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger Microsoft ASP .NET 2 2nd Dec 2006 04:46 PM
Sort, and then sort from the first sort =?Utf-8?B?S0I=?= Microsoft Access 9 9th Jun 2006 04:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:05 AM.