syntax error (missing operator) on IIF Statement

NLR

Registered User.
Local time
Today, 01:08
Joined
Aug 29, 2012
Messages
71
Hi,
I'm using the following for a field in a query:

ITINERANT: IIf([Day and Time1] Is Not Null,[Day and Time1],IIf([Day and Time2] Is Not Null,[Day and Time2],IFF([Day and Time 3] Is Not Null,[Day and Time 3],IFF([Day and Time 4] Is Not Null,[Day and Time 4],IFF([Day and Time 5] Is Not Null,[Day and Time 5]," ")))))

I'm getting the error message: Syntax error (missing operator).
I'm not very good at using the IIF statement.
I have 5 concatenated fields that may or may not have info.
I want to display all of the info or if blank; show nothing in the one field.

Also, would I be able to have a return after each of the 5 concatenated fields?
Not sure how to do that in this statement?

Any help is appreciated!
NLR :banghead:
 
Is this truly how your data is in your Table? :eek:

If yes, you really need to check on Normalization.
Code:
Nz([Day and Time1], Nz([Day and Time2], Nz([Day and Time 3], Nz([Day and Time 4], Nz([Day and Time 5], "")))))
 
[Day and Time1] etc. are concatenated fields in the same query.
I have Day1 and Time1 for the 5 days of the week to record possible days M - F and different times in each day in the table.
Not sure how else to collect this info?
 

Users who are viewing this thread

Back
Top Bottom