Check date and return a field

  • Thread starter Thread starter JBP
  • Start date Start date
J

JBP

Hello All,

My questions is how can i write and expression that would
check two fields and return a third.

eg
StartDate End DAte Permonth
02/05/2004 09/25/2004 100

****So the expression would go something like this
start date less than 01/01/2004 and greater than
01/31/2004 or end date 01/01/2004 and greater than
01/31/2004 = permonth****

this would return 0 if the next month in a separate
expression is check it will return 100.
 
Hi,


Assuming you meant >= rather than less, and so on, a possible expression
is:


iif( (StartDate >= #01/01/2004# AND StartDate <= #01/31/2004# )
OR (EndDate >= #01/01/2004# AND EndDate <= #01/31/2004# )
, Permonth, 0 )



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top