Report.
You can use the DateGrouping property to specify how you want to group dates in a report. For example, if your countrys First Weekday setting is Monday, using the US Defaults setting will cause the week to begin on the incorrect day; if you set a Date/Time fields GroupOn property to Week, the report will group dates from Sunday to Sunday instead of from Monday to Monday.
Note The DateGrouping property setting applies to the entire report, not to a particular group in the report.
The DateGrouping property uses the following settings.
Setting | Description | Visual Basic |
US Defaults | Microsoft Access uses the default U.S. settings for First Weekday (Sunday) and First Week (starts on Jan 1). | 0 |
Use System Settings | (Default) Microsoft Access uses settings based on the locale selected in the Regional Settings section of the Windows Control Panel. | 1 |
You can set this property in the reports property sheet, a macro, or Visual Basic.
You can set the DateGrouping property only in report Design view or in the Open event procedure of a report.
The sort order used in a report isnt affected by the DateGrouping property setting.
Date Function.
The following example gets the value of the DateGrouping property for a report and assigns it to the intGetDateGrouping variable.
Dim intGetDateGrouping As Integer= Reports![LastYear].DateGrouping\