S
Shawn Oatley
Hello,
I want to run a query that has to WHERE fields but if one of the field should be null, then still run the query.
For example:
SELECT from Links where Category=[Forms]!frmLinks![cboCategory] AND SubCategory = [Forms]!frmLinks![SubCategory]
But, should the category in question have no Sub Categories, I would like the query to run, but not require the SubCategory field.
I have tried assigning the form to using an SQL recordsource that I can change as I check the SubCategory (if it is null or not) but when I change the Recordsource property it comes back with a 2001 error (You cancelled the previous option).
Any ideas???
Shawn
I want to run a query that has to WHERE fields but if one of the field should be null, then still run the query.
For example:
SELECT from Links where Category=[Forms]!frmLinks![cboCategory] AND SubCategory = [Forms]!frmLinks![SubCategory]
But, should the category in question have no Sub Categories, I would like the query to run, but not require the SubCategory field.
I have tried assigning the form to using an SQL recordsource that I can change as I check the SubCategory (if it is null or not) but when I change the Recordsource property it comes back with a 2001 error (You cancelled the previous option).
Any ideas???
Shawn