What the compiler is saying, is that "not all code paths return a value". This is because you don't return anything outside the foreach loop. The problem lies in the fact that it is theoritically possible that the queryCollection is empty. If it is empty you bypass the loop and go directly to the end of the method. Return something after the loop and the problem will go away. Also, are you sure you only want to execute the loop once? I mean right when you enter the foreach for the first time you will be exiting the method also. -Nathan --------------------------- Hmmm... what's a signature?