you need to filter the recordset using the code column and a Form Variable.
in the Filter section of the recordset, select the code column "=" "Form variable" then enter the name of the text box on your form.
the set session value behaviors should be added to the form page.
open the server behaviors panel, and click the plus button, select webassist-> Cookies -> Set Session Value.