Thanks for all your suggestions guys. It looks as if Howard's method is the one I'm going to use. I still think it's a bit clunky, but at least it'll work and it's better than anything else I can come up with!
Andy