Stranger and stranger.
Your code works, and when I pasted in my code from above, it now works! Just put it down to experience I guess.
Thanks for your help.