Thank you,
K
That is not really the right way to go about it, use 2 recordsets, one to query the daily_candy table for the entered coupon code, and a second to query the orders table for the coupon code.
using this rout, you would add a second set session value behavior, use the recordset for the orders table Is Not Empty Trigger and set the coupon session to an empty value, make sure this come after the original set session code.
you can also use a show region behavior to show your message about the coupon being used if the orders recordset is not empty.