Thanks to those who responded to this - only one of the methods suggested had occurred to me (the state variable), so now I have a lot to think about and a lot to learn. I'll report back when I've chosen a method and got it working. Graham --------------------------------------------------- Graham Samuel / The Living Fossil Co. / UK & France