Would be much simpler to post your WHOLE code here than let us GUESS what could be wrong ...

Don't you think ???

Alain