Thanks for your help.
K Krzysztof Pozorek [MVP] Jun 10, 2008 #2 U¿ytkownik "SusanJ said: Thanks for your help. Click to expand... Public Function getSunday(iYear, iWeek) As Date Dim d As Date d = DateSerial(iYear, 1, 1) + (iWeek - 1) * 7 getSunday = d - Weekday(d) + 1 End Function K.P. www.access.vis.pl
U¿ytkownik "SusanJ said: Thanks for your help. Click to expand... Public Function getSunday(iYear, iWeek) As Date Dim d As Date d = DateSerial(iYear, 1, 1) + (iWeek - 1) * 7 getSunday = d - Weekday(d) + 1 End Function K.P. www.access.vis.pl
S SusanJ Jun 11, 2008 #3 I don't write code. Isn't there a function I can use in a query? Like DatePart?
K Krzysztof Pozorek [MVP] Jun 11, 2008 #4 You write this function in common module and use it like DatePart or any other built-in function: SELECT getSunday(FieldYear, FieldWeek) FROM Table1 K.P.
You write this function in common module and use it like DatePart or any other built-in function: SELECT getSunday(FieldYear, FieldWeek) FROM Table1 K.P.