Michelangelo
Registered User.
- Local time
- Today, 19:08
- Joined
- Dec 20, 2002
- Messages
- 37
Hi,
I want to create a parameter query for which the criteria are defined on the fly. To do this I've created a table called Parameters with several fields and only one record, and I use this one for all the queries. Then, depending on which query I want to use I fill the table with the correct values. The query has its fields with the criteria depending on a specific value in the table Parameters.
This works fine in case I have defined the corresponding Parameter field. However I want it to return all records if there is nothing in the Parameter field.
I've tried this one, in various variations
IIf(Len([Parameters]![EmployeeCode])>0,[Parameters]![EmployeeCode,"")
This works great if I supply a correct value in the Parameter table, when I leave it empty it returns no records.
Any ideas how to create a correct criteria???
M.
I want to create a parameter query for which the criteria are defined on the fly. To do this I've created a table called Parameters with several fields and only one record, and I use this one for all the queries. Then, depending on which query I want to use I fill the table with the correct values. The query has its fields with the criteria depending on a specific value in the table Parameters.
This works fine in case I have defined the corresponding Parameter field. However I want it to return all records if there is nothing in the Parameter field.
I've tried this one, in various variations
IIf(Len([Parameters]![EmployeeCode])>0,[Parameters]![EmployeeCode,"")
This works great if I supply a correct value in the Parameter table, when I leave it empty it returns no records.
Any ideas how to create a correct criteria???
M.