IF (em = rec.emailaddr) THEN found = 1; -- looks like we foundthe email addr. END IF;found=1; should be found:=1;- Stuart