the rule should be configured to use the session variables that you created, not the form post or the recordset.
the point is to set a session with the winning code. In my previous reply, i suggested filtering the recordset, but that was not right. The recordset should not have any filtering, sorry about that.
and set another session with the entered code.
this is done by creating a form with a text box in it and using the set session value behavior to capture it.
In the rule, you use the 2 sessions for comparison to see if they match.
if they do, then the user entered the right code.....