The recordset is in an IF statement, so it doesn't always exist. I've updated your code so that the IF statement includes the code that writes the value so that it won't try to reference a recordset that hasn't been created.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.