ok, well I did not say that changing the code would fix the problem, i said that changing the code would output the SQL that is causing the error to the screen. I asked you to post that SQL back, with this information I can then try to determine the cause of the problem and give you advice on how to fix it.