.... and another option:
IIf(IsNumeric([yr]) AND IsNumeric([mo] AND IsNumeric([dy]),
DateSerial([yr], [mo], [dy]), Null)
(type as one line in your code.)
--
HTH
Van T. Dinh
MVP (Access)
"Emjaysea" <(E-Mail Removed)> wrote in message
news

EEC5737-78E2-42C0-9312-(E-Mail Removed)...
>I have month, day, and year variables for some records but not for others
> (appropriately). I need to create an expression that will return a date
> value or a string version of that value if those are populated and a null
> or
> a blank string if they aren't. I can convert to a date or a string with
> that
> date, but I always get #Error when there is not a valid date.
>
> Here's one version of what I've tried so far. Any ideas? Thanks.
>
> apptdate:
> IIf(CDate(DateSerial([tblNV]![yr],[tblNV]![mo],[tblNV]![dy])),CStr(CDate(DateSerial([tblNV]![yr],[tblNV]![mo],[tblNV]![dy]))),"")