Re: Sorting Dates
- From: Melinda <Melinda@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 21 Apr 2008 06:39:05 -0700
Sorry, but I am a bit confused. Back in the table I have the Seniority
Date as a Date/Time field, and the format at the bottom is Short Date. When
I wrote the report I have the seniority date coming from tblEmployees, is
that possibly where the problem is because it is not in the query? I have
checked and rechecked everything you guys have said, but if I am looking at
it correct it appears that I have everything ok. Anything else I can check?
"Duane Hookom" wrote:
Fredg is correct as usual. Your statement "I also have it set up as a short.
date" raises a red flag. You don't normally provide a format to a numeric or
date value you want sort on. Leave it alone.
Also, are you sure the Total Hours doesn't include more decimal places that
aren't displayed?
--
Duane Hookom
Microsoft Access MVP
"Melinda" wrote:
I do have it as a "Date Datatye". I am sorting in the report, I am first
sorting by a ClassNo, 2nd, Total Hours, and 3rd SeniorityDate. I have the
SeniorityDate set up as Date field in the table and that is where I am
bringing into the report from. I didn't know if I could go into the record
souce from the actual report and type descending or something of that sort.
I also have it set up as a short date.
"fredg" wrote:
On Fri, 18 Apr 2008 10:25:00 -0700, Melinda wrote:
I have looked through all the postings, but don't see one that quite fits
what I am doing, and have failed at all the attempts I have made. I am
sorting Seniority Dates in a total overtime report. When 3 employees have
the same year to date total hours of overtime, I need it to then sort by
seniority, with the most senior person being called in to work first. I
have three employees with 16.4 hours of overtime, and their seniority dates
are 05-13-2000, 06-14-1990, and 06-28-1986. I see that it is sorting on the
month and then the date, but I need the most senior person being listed
first. How do I change my sort?
What is the actual datatype of the Seniority Date field?
Is it Text datatype or is it Date datatype.?
Where are you doing the sorting? In the query or in the Report?
1) The Seniority Date field should be Date datatype (I suspect yours
is Text).
2) Any sorting you do in the query is irrelevant to the sorting in the
report.
To sort the report, use the Report's Sorting and Grouping dialog...
Click on View + Sorting and Grouping.
If the [SeniorityDate] is actually a Date datatype .....
In the Field/Expression column write:
[SeniorityDate]
on the top line.
In the Sort column write
Ascending
If the [SeniorityDate] is actually a Text datatype .....
In the Field/Expression column write:
=CDate([SeniorityDate])
on the top line
In the Sort Column, write
Ascending
The report should now sort according to Seniority.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
- Follow-Ups:
- Re: Sorting Dates
- From: KARL DEWEY
- Re: Sorting Dates
- References:
- Sorting Dates
- From: Melinda
- Re: Sorting Dates
- From: fredg
- Re: Sorting Dates
- From: Melinda
- Re: Sorting Dates
- From: Duane Hookom
- Sorting Dates
- Prev by Date: RE: Exporting into Text Format
- Next by Date: RE: Page Width
- Previous by thread: Re: Sorting Dates
- Next by thread: Re: Sorting Dates
- Index(es):
Relevant Pages
|