> I don't think you can use IS NULL in the IIf statement. Try:
>
> IIf(IsNull([DateOfDate]), Date(), [DateOfDeath])
>
> Of course, this is exactly what the Nz function is for:
>
> Nz([DateOfDate], Date())
>
> --
> Doug Steele, Microsoft Access MVP
>
http://I.Am/DougSteele> (no private e-mails, please)
>
>
> "Klatuu" <Klatuu[ at ]discussions.microsoft.com> wrote in message
> news:CDAF0314-B35D-4C13-AADE-1A92D25DAF4E[ at ]microsoft.com...
> > within your existing code,
> >
> > IIf([DateOfDate] IS NULL, Date(), [DateOfDeath])
> >
> > Just change DateOfDeath to the field name in your table that carries this
> > data.
> >
> > "Philip Wright" wrote:
> >
> >> I'm wanting to calculate an age either by date of death or current date
> >> in a
> >> query. How do I do this?
> >>
> >> I currently have expressions to calculate current age, but if a patient
> >> is
> >> deceased, I want it to display age at death instead of the current age.
> >>
> >> Thanks.
> >>
> >> Philip Wright
>
>
>