Week number

A

Art Vandaley

Hi,

(Access 2007)
I have a problem with my query which shows week numbers on a column. Week
numbers derived from date field of table. Column has below string:

WEEK: Format$([Table1].[Date1];'ww')

Above equation gives next week number for Sundays. On my computer date
system is normally adjusted to start the new week number on Mondays.

At the other hand I have a string calculating week number for my form like:

WEEK.Value = Format(Date1.Value, "ww", vbMonday, vbFirstFourDays)

Above formula gives correct result. For example:

24th. February 2008 ==> My form gives 8 and my query gives 9 for week
number. Actually, both should give result of 8

Does anybody have an idea?

PS. Wayne's method did not work.

Best Regards.
 
C

Conan Kelly

Art Vandaley,

"NO SOUP FOR YOU!!!" "SERENITY NOW!!!" "HOOCHIE MAMA!!!" "A Festivus for
the rest of us!!!"

Can't you just adjust the Format() function in the query to work like the
one on the form? Add the "vbMonday" & "vbFirstFourDays" arguments to the
format function in the query.

HTH,

Conan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Week numbers 2
Wrong week number 2
Get date for start of week 3
Week Number 2
Function for week number 5
Week Numbers 1
datepart returns erroneous week number? 2
Number of week wrong 1

Top