If i take away the IF statement it works. But i see no reason why i should have to do that. can anyone shed any light on this for me?