Problems using IIF with Dates as criteria in a query
I am trying to use a IIF command in a query with date functions but can’t get it to work.
I am trying to limit a list of Suppliers to a choice of all or the last 3 months.
I have the following 2 parts working when used alone as criteria.
IIF ([Forms]![frmSuppliersTransMain]![status] = “full”,#1/7/2015#,#1/6/2015#)
Between date() and DateAdd(“m”,-3,date())
But if I try to combine them I don’t get any records or any errors.
IIF ([Forms]![frmSuppliersTransMain]![status] = “full”, Between date() and DateAdd(“m”,-3,date())
, Between date() and DateAdd(“m”,-90,date())
In fact I don’t get any records when using and any date function such as <date()
I am sure there is not much wrong
If anyone can help I would appreciate it.
I am trying to use a IIF command in a query with date functions but can’t get it to work.
I am trying to limit a list of Suppliers to a choice of all or the last 3 months.
I have the following 2 parts working when used alone as criteria.
IIF ([Forms]![frmSuppliersTransMain]![status] = “full”,#1/7/2015#,#1/6/2015#)
Between date() and DateAdd(“m”,-3,date())
But if I try to combine them I don’t get any records or any errors.
IIF ([Forms]![frmSuppliersTransMain]![status] = “full”, Between date() and DateAdd(“m”,-3,date())
, Between date() and DateAdd(“m”,-90,date())
In fact I don’t get any records when using and any date function such as <date()
I am sure there is not much wrong
If anyone can help I would appreciate it.