• The first thing to try is to put a SELECT @ADR3 statement in just after you set the value of the variable. Then you can see whether the problem is that the variable is not being set correctly, or that your IF logic is not working as expected.

    John