Hi,
I've created a query which is used for searching a table.
So when you have the searchform you can enter a number fields the search is based on. The problem is when a field is empty, I dont want to select the records inwhich the empty field occurs, but the all the records...
I hope it's clear....;-)
This is what I had in the query:
SELECT Id, name
FROM table
WHERE (((tblBedrijven.Id1)=IIf(IsNull([Forms]![form1]![listboxId1]),[Id1],[Forms]![form1]![listboxId1])) AND .... {the rest}
But it wont work this way....
I've created a query which is used for searching a table.
So when you have the searchform you can enter a number fields the search is based on. The problem is when a field is empty, I dont want to select the records inwhich the empty field occurs, but the all the records...
I hope it's clear....;-)
This is what I had in the query:
SELECT Id, name
FROM table
WHERE (((tblBedrijven.Id1)=IIf(IsNull([Forms]![form1]![listboxId1]),[Id1],[Forms]![form1]![listboxId1])) AND .... {the rest}
But it wont work this way....