You are assigning PTWOHIT, in what looks like a comparison operation. Maybe you meant: IF PTWOHIT==TRUE THEN...