Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Month text vs. Month number 1

Status
Not open for further replies.

kschomer

Technical User
Aug 1, 2000
37
0
0
US
Using downloaded data from another application (ASCII .csv formatted file).  The .csv file is linked into MSAccess using macro's I get the data from .csv file into a table called ANALYSIS TABLE.  The problem is ORDERED date field (ie. 1/6/00 instead of 01/06/00)  I am using a crosstab query I convert ordered (ie 5/3/00 etc.) into January, Feb etc.  However, my sort order on the report is based on the text of the month rather than the ordered date field.  Therefore report is sorted April, June, May instead of April, May, June.  How do I force the sort order based on the ORDERED field.
 
How many rows do you have in your crosstab? If you haven't exceeded your maximum already, you could add an expression for a Row Heading which results in a numeric value.<br><br>Assuming table name is tblMyTable, field is named MyDate, and MyDate's format is a valid Date/Time format; insert a column into your query with an expression something like this:<br><br>DateNum: Val(Format([tblMyTable].[MyDate],&quot;m&quot;))<br><br>Then use your calculated field &lt;DateNum&gt; when you set your report's sorting and grouping levels.<br> <p>Carter Wickstrom<br><a href=mailto:wickerman26@hotmail.com>wickerman26@hotmail.com</a><br><a href= > </a><br>
 
Carter Wickstrom,&nbsp;&nbsp;It works PERFECTLY.&nbsp;&nbsp;Thank you for a simple solution. Karen<br>&nbsp;&nbsp;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top