Perhaps you should post the whole function (copy from the IDE and paste intothe email) and we can try to spot what is wrong.