O
Opal
I have a query where I am determining when a
supervisor has not completed a task in a week.
What I need to be able to do, given the week
number is determine the Monday date for the
week. I have the week number but I am unable
to find a way to give me this information. I found
the following function:
Public Function GetDateByYearWeekNumWeekDay(iYear As Integer, _
iWeekNum As Integer, iWeekDayNum As Integer) As Date
Dim vdate As Date
vdate = DateSerial(iYear, 1, 1) + ((iWeekNum - 1) * 7)
GetDateByYearWeekNumWeekDay = DateValue(vdate - Weekday(vdate) +
iWeekDayNum)
End Function
and put this in my query:
WeekOf: GetDateByYearWeekNumWeekDay(2010,[WeekID],[vbMonday])
I get a parameter pop-up for vbMonday.
Can anyone help me get this to work? Thanks!
supervisor has not completed a task in a week.
What I need to be able to do, given the week
number is determine the Monday date for the
week. I have the week number but I am unable
to find a way to give me this information. I found
the following function:
Public Function GetDateByYearWeekNumWeekDay(iYear As Integer, _
iWeekNum As Integer, iWeekDayNum As Integer) As Date
Dim vdate As Date
vdate = DateSerial(iYear, 1, 1) + ((iWeekNum - 1) * 7)
GetDateByYearWeekNumWeekDay = DateValue(vdate - Weekday(vdate) +
iWeekDayNum)
End Function
and put this in my query:
WeekOf: GetDateByYearWeekNumWeekDay(2010,[WeekID],[vbMonday])
I get a parameter pop-up for vbMonday.
Can anyone help me get this to work? Thanks!