Query Criteria Expressions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there an expression that would state that for the Date Field it would be
for Current Work Week and then for the Previous Work Week?
 
What day of the week is the start of the Work Week? Monday? Sunday? It makes
a difference. Also what day did the first week of the year start?

The following returns 6 for today:
Debug.Print DatePart("ww",Date(),vbMonday, vbFirstJan1)
 
Sorry, sometimes I forget that people can't read my mind. I was looking for
a formula that would give me results for a work week. Instead of "Between
#1/29/07# and #2/2/07#" have a Date Serial or something that would always
pull up the previous work week totals.
 
Perhaps this is what you search for

Between DateAdd("d",1-WeekDay(Date())-6, Date()) And
DateAdd("d",1-WeekDay(Date())-2, Date())

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top