If Length(totext({Insurer.InsurerCode})) = 09
this line isn't doing what I think you want. It currently reads, if the length of the insurerCode = 9. What I think you want is: totext({Insurer.InsurerCode}, "", 0) = "09"
I would check this as well, because if {Insurer.InsurerCode} is a number, the totext value is 9, not 09. By default totext for a number will format as 9.00.
So to debug, I would create a simple formula that is just:
totext({Insurer.InsurerCode}, "",0)
and see what results you get. Then you can code your formula to respond correctly.
I'm not looking at help, but I think that you can give totext a 'picture' of how to transform your number to a string..."00" should work in your case (if totext accepts the argument)
HTH