Collection Query Problem

I have tested the code and it works a treat! Thank you.