Thank you all for your help, I now have a working solution and am indebted to you both
Many thanks,
Tom