Microsoft KB Archive/76417

= Works: How to Print Database Reports in Month or Day Order =

Article ID: 76417

Article Last Modified on 11/16/2006

-

APPLIES TO


 * Microsoft Works 2.0 Standard Edition
 * Microsoft Works 2.0a
 * Microsoft Works 3.0 Standard Edition
 * Microsoft Works 3.0a
 * Microsoft Works 3.0b
 * Microsoft Works 4.5 Standard Edition
 * Microsoft Works 4.5a
 * Microsoft Works 4.0 Standard Edition
 * Microsoft Works 4.0a

-



This article was previously published under Q76417



SUMMARY
When using the Works Database module's report function, you may want to print your report in order of days or months (that is, all January dates, followed by February's, or all day one reports followed by day two reports, and so on).

However, if you entered the data in full date format (month, day, year), and the field is formatted as a date field, you are not able to sort your report by month or day in this date field. To sort the data in month or day order, do the following:

Works 3.0 for Windows and Works 4.0, 4.5, and 4.5a for Windows 95
 On the View menu, click List. Select the field containing the date information and from the Edit menu, click Select Field. Works 4.0, 4.5, and 4.5a for Windows 95:

On the Record menu, click Insert Field and select After.

Works 3.0:

On the Insert menu, click Record/Field. Works 4.0, 4.5, and 4.5a for Windows 95:

In the Insert Field dialog box, type the name of the field (Month or Day). Click Add, then click Done.

Works 3.0:

From the Edit menu, click Field Name. Rename the field to Month or Day. In the first record of the Month or Day field, type

=Month(Date)

where (Date) is the name of the field containing the date information.

NOTE: If the field name is a reserved word, such as the word &quot;Date&quot; itself, place single quote marks before and after the field name in the formula, for example, =Month('Date'). Works 4.0, 4.5, and 4.5a for Windows 95:

On the Record menu, click Sort Records.

Works 3.0:

On the Tools menu, click Sort Records. In the first field box, select the Month or Day field. In the second field box select the Date field. Choose OK.</li></ol>

NOTE: To hide the Month Field, from the Format menu, click Field Width in Works for Windows 95, or Column Width in Works 3.0, and set the Width to zero (0). Make sure that the format of the Month field is set to General.

Works 2.0
<ol> From the View menu, click List.</li> From the Edit menu, click Insert Record/Field to insert a field next to the field containing the date.</li> From the Edit menu, click Field Name, and enter the name &quot;month&quot; or &quot;day&quot; in the Name box.</li> In the &quot;month&quot; or &quot;day&quot; field, enter the formula

=MONTH(Date)

for a month sort, or

=DAY(Date)

for a day sort, where (Date) is the name of the field containing the complete date (month, day, year). The above formulas return only the month or day from the (Date) field.</li> From the View menu, click Create New Report. Sort on the &quot;month&quot; or &quot;day&quot; field, select the field, then delete it from the report screen.</li></ol>

The report will be in month or day order. The &quot;month&quot; or &quot;day&quot; field does not appear when you print the report, but the field containing the complete date does appear.

Additional query words: 2.00 2.00a 3.00 3.00a 3.00b 4.00 4.00a 4.50 4.50a db fmt w_works

Keywords: kbhowto KB76417

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.