
Signature
Duane Hookom
Microsoft Access MVP
> The age is determined by the daterecieved. Table name is SCD, sorry for the
> confusion. I was curious if the datediff would work!
[quoted text clipped - 6 lines]
> > >
> > > Thanks
I tried this, it did not work...
Sum(IIf(daterecieved < Date() - 30 AND completed Is Null)) AS daysoverdue
> "I was curious if the datediff would work!"
> You don't need our permission to try. Come on back if you can't get this to
[quoted text clipped - 10 lines]
> > > >
> > > > Thanks
Douglas J. Steele - 14 May 2008 22:06 GMT
Not overly surprising that that didn't work.
IIf(daterecieved < Date() - 30 AND completed Is Null)
is invalid. An IIf function is defined as IIf(expr, truepart, falsepart)
You've got the expr part (the expression you want to evaluate), but you
don't have the truepart (the value you want returned if expr is True), not
the falsepart (the value you want returned if expr is False)

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
>I tried this, it did not work...
>
[quoted text clipped - 19 lines]
>> > > >
>> > > > Thanks
Evi - 18 May 2008 14:46 GMT
It looks like you want to count in your report how many records have a
DateReceived which is less than Date()-30 and the Completed field is null
Use
=-Sum(DateRecieved <(Date()-30) AND IsNull(Completed))
(there is a - before the Sum)
If a statement is true, it has a value of -1, otherwise it has a value of 0
Evi
> I tried this, it did not work...
>
[quoted text clipped - 22 lines]
> > > > >
> > > > > Thanks