Right, that seems to have got me heading in the right direction. I'll let you know how I get on.

Thanks to all of you for your advice!