There might be a couple of ways you can do this. You can either selectively include or exclude the where clause that is filtering the recordset, or you can modify it with a statement that will return all rows if there are no matches for the first two statements in the where clause.
If you have an auto incrementing id column for the table you could add to the where clause to say
WHERE idcategory_product=colname OR idcollection_product=colname2 OR product.id > 0
If there were no matches for the first two then this one should allow for all records where the product id is greater than 0.
If you wanted to include or exclude the where clause you could do so by assigning the where clause to a variable, then based on weather you want to see all the results you can set this variable to be blank.