Weeknumbers?

  • Thread starter Thread starter Henro
  • Start date Start date
H

Henro

I have a field in a query that translates a date to a weeknumber, simply by
using notation 'ww'
But now it sorts the weeks in reports as

1
11
12
...
19
2
20
21
22
...
29
3
30
31
32
...


and so on. Can I change this? How?

TIA Henro
 
Report ignores the sorting / ordering in Query.

In the DesignView of the Report, use View / Grouping and Sorting ... to sort
the Records in the Report.

Also, instead of using the Format() function to get the WeekNo, use
DatePart() instead. Format returns a Variant (of String type) and
therefore, Access performs String sorting (1, 11, 111, 2 ...). Since you
want to perform numeric sorting, you need DatePart which returns a numeric.
 
Back
Top