David Ball
Registered User.
- Local time
- Today, 14:09
- Joined
- Aug 9, 2010
- Messages
- 230
Hi,
I have an IIf statement in a calculated field in a query and it looks for 4 conditions. It works fine when any of the 4 conditions are met but in cases where none are met, and I want it to return nothing, (" "), it returns #Error.
What is wrong with the formula?
10Jul15: IIf(([StartDate]<=#4/07/2015# And [FinDate]>=#10/07/2015#),[WeeklyQty],IIf(([StartDate]>=#4/07/2015# And [FinDate]<=#10/07/2015#),[Sales],IIf([StartDate] Between #4/07/2015# And #10/07/2015#,([DailyQty]*[FrontDays]),IIf([FinDate] Between #4/07/2015# And #10/07/2015#,([DailyQty]*[BackDays])," "))))
PS, any ideas on making it a lot simpler and shorter would be appreciated to!
Thanks very much
Dave
I have an IIf statement in a calculated field in a query and it looks for 4 conditions. It works fine when any of the 4 conditions are met but in cases where none are met, and I want it to return nothing, (" "), it returns #Error.
What is wrong with the formula?
10Jul15: IIf(([StartDate]<=#4/07/2015# And [FinDate]>=#10/07/2015#),[WeeklyQty],IIf(([StartDate]>=#4/07/2015# And [FinDate]<=#10/07/2015#),[Sales],IIf([StartDate] Between #4/07/2015# And #10/07/2015#,([DailyQty]*[FrontDays]),IIf([FinDate] Between #4/07/2015# And #10/07/2015#,([DailyQty]*[BackDays])," "))))
PS, any ideas on making it a lot simpler and shorter would be appreciated to!
Thanks very much
Dave