Thanks, I really appreciate this. I'll need to look at what each part does as it looks pretty complicated.
I've actually slightly changed my needs on this, and a different post is here: http://www.codingforums.com/showthread.php?t=275781
I'm guessing someone will complain about double posting, but they are supposed to be different. (Sorry)
I'll try and work out how to change it to work for that, but any pointers would help.