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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need date from 1 of 3 fields to appear in the calculated field 2

Status
Not open for further replies.

cimoli

Technical User
Jul 30, 2010
207
US
I have 4 tables in the query that has 4 fields.
ReservationID, StartDateIn, SplinterDateIN and ResortArriveDate.
I want to make a 5th field which would be a calulated field called TDate3.

TDate3 would be a date field. It needs some kind of IIF statement to look
at the last 3 fields for a date. Each record will have only 1 date in either
StartDateIn, SplinterDateIN, ResortArriveDate

For example, if SplinterDateIN had a date, the other 2 are always blank.
If StartDateIn had a date, the other 2 are blank.

TDate3 takes the date answer. This is my way of getting 3 distinct table's dates
combined for other uses.

I added a dropbox example if needed.

Thanks much.
 
Something like this ?
TDate3: IIf(IsDate(StartDateIn),StartDateIn,IIf(IsDate(SplinterDateIN),SplinterDateIN,ResortArriveDate))

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

Part and Inventory Search

Sponsor

Back
Top