Hi,
I have a query I am filtering dates with criteria as follows which works perfectly:
Between [Forms]![SalesAnalysisQuotes]![txtStartDate] And [Forms]![SalesAnalysisQuotes]![txtEndDate]
However I want to introduce an IIf into this as follows:
IIf([Forms]![SalesAnalysisQuotes]![txtQuoteDateOption]=1,[Quotations].[QuoteDate] Between [Forms]![SalesAnalysisQuotes]![txtStartDate] And [Forms]![SalesAnalysisQuotes]![txtEndDate],[Quotations].[QuoteDate] Between [Forms]![SalesAnalysisQuotes]![txtStartDate2] And [Forms]![SalesAnalysisQuotes]![txtEndDate2])
However it will not return any records, am I doing something wrong or is it not possible to achieve this in this way?
Thanks
I have a query I am filtering dates with criteria as follows which works perfectly:
Between [Forms]![SalesAnalysisQuotes]![txtStartDate] And [Forms]![SalesAnalysisQuotes]![txtEndDate]
However I want to introduce an IIf into this as follows:
IIf([Forms]![SalesAnalysisQuotes]![txtQuoteDateOption]=1,[Quotations].[QuoteDate] Between [Forms]![SalesAnalysisQuotes]![txtStartDate] And [Forms]![SalesAnalysisQuotes]![txtEndDate],[Quotations].[QuoteDate] Between [Forms]![SalesAnalysisQuotes]![txtStartDate2] And [Forms]![SalesAnalysisQuotes]![txtEndDate2])
However it will not return any records, am I doing something wrong or is it not possible to achieve this in this way?
Thanks