Hello there
I tried to make a query selecting data, one of the conditions turns
on the Date. My 'Date' field consists of a consecutive number of dates
except Week-end days.
When I use the criterium:
IIf(Date()-1=0,Date()-3, Date()-1) I don't get what I want. What I
want is that when running this query on mondays I get the info for
last friday.
Does anybody have any suggestion?
Thx
Gerry
John Spencer - 13 Nov 2007 17:04 GMT
Try this expression
IIF(WeekDay(Date())=2,Date()-3,Date()-1)
The criteria in your expression basically said if the system date is Dec 31,
1899 then use the date that was 3 days ago, otherwise use the date that was
yesterday.

Signature
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.
> Hello there
>
[quoted text clipped - 8 lines]
> Thx
> Gerry