I have a report written in Access 2003. It defaults to Sunday as the first day of the week. I need it to be Monday. Can anyone help. I can't find how to change the default.
That is not very much information. What do you mean by the report defaulting? This could mean about 100 things. There are lots of date functions where you can specify the default first day of the week, but without some information I have no idea. At a minimum.
1) Provide the Sql recordsource for the report
2) Provide all code in question
I used the report wizard to create a report grouped by the week. The reports first day is Sunday, not Monday. I assumed the was a default setting for the wizard that could be changed to Monday.
Can not really help without seeing the SQL for the report. Here is the likely problem, but I can not tell you where it is. Somewhere in the query or the sorting and grouping is this function
Weekday(date, [firstdayofweek])
Where date is your field. In your query it would look like this
Weekday([yourFieldName])
Because the default is Sunday.
If you can find this function change to
Weekday([yourFieldName],vbMonday)
This sets to Monday.
This function returns a number 1 to 7. So if you put in a date that falls on monday and you put vbMonday as the second parameter it returns a 1 and a day that falls on Sunday returns a 7. But if you do not put in the second parameter it returns a 1 for Sunday and a 2 for Monday
When you choose a date field in the Sorting and Grouping, you have the opportunity to set the "Group On" to values like Year, Quarter, Month, Week, Day, etc. You can't set the week starting date in this dialog. You only need to subtract 1 from the date to group by weeks starting on Monday.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.