No prob.
When I select P45 and debug it triggers this code? In the code it has "NE 'P46'" therefore when I select P45 and the TXCOD field is initial this code is triggered and I get the error message so it should be the same for you?
Or maybe I am wrong, not sure, very early in the morning here and I haven't had my coffee yet.