T
Tim
Hi folk,
I have the following query in my db:
SELECT Sales.Invoice, Sales.Code, Sales.IDate
FROM Sales
WHERE (((Sales.IDate)=[forms]![form1]![text0]));
It works fine but I also want the query return all
records when user put "all" into the [forms]![form1]!
[text0]. Could anyone show me how to do it?
I tried something like this:
SELECT Sales.Invoice, Sales.Code, Sales.IDate
FROM Sales
WHERE (((Sales.IDate)=IIf([forms]![form1]![text0]="all",
(Sales.IDate) Like "*",[forms]![form1]![text0])));
But it didn't work.
Please help.
Thanks in advance.
Tim.
I have the following query in my db:
SELECT Sales.Invoice, Sales.Code, Sales.IDate
FROM Sales
WHERE (((Sales.IDate)=[forms]![form1]![text0]));
It works fine but I also want the query return all
records when user put "all" into the [forms]![form1]!
[text0]. Could anyone show me how to do it?
I tried something like this:
SELECT Sales.Invoice, Sales.Code, Sales.IDate
FROM Sales
WHERE (((Sales.IDate)=IIf([forms]![form1]![text0]="all",
(Sales.IDate) Like "*",[forms]![form1]![text0])));
But it didn't work.
Please help.
Thanks in advance.
Tim.