Wonderful. Perfect. Thank you.
Not only has this solved my initial problem but by reverse engineering and tweaking your additional bit of code it has allowed me to solve a couple of other problems I was having trouble with in other projects.
Really, thanks so much for taking the time to reply so quickly.
Simon