Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a calculated field looking at 3 date fields in query 1

Status
Not open for further replies.

cimoli

Technical User
Jul 30, 2010
207
US
I have a working calculated field in a query which compares 2 real date fields. However, I am introducing a 3rd date field.
I do not know how to change the calculated field to look at all three dates.

Here is what I presently have and it works. It uses 2 date fields.
StartDateIn and SplinterDateIN

Then the calculated Tdate2 date field is TDate2: IIf(IsNull([StartDateIN]),[SplinterDateIN],[StartDateIN])
Therefore, if the startDateIn is blank, it uses the SplinterDateIn and the reverse also.

But now, I have a new 3rd date field called CrazyDate.
I need a revised Tdate2 to analyze the 3 dates. A record will use 1 of these 3 dates and the
Tdate2 picks it.

Can you help me on a revised Tdate2 calculation.
 
something like this?
TDate2: IIf(IsNull([StartDateIN]),IIf(IsNull([SplinterDateIN]),CrazyDate,SplinterDateIN),[StartDateIN])

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top