To troubleshoot the cause, we will need to be able to test in a similar set up to yours. to do that we need to know the following:
What is your version of Dreamweaver?
What is your OS?
What extensions including the version numbers are installed?
It sounds like the steps you are taking to produce the problem is to add a where clause with a dynamic variable to an existing recordset?