Many thanks Ray,
That's the way I was going about it when it all became a bit complicated. You have, in fact, confirmed my logic, so now I know that I was going about it the right way I may just get there on my own.
To be honest I'm not that bothered with this functionality on this project but it may prove to be beneficial in the future. Other wise you tend to get clogged up with files that are just not necessary any more.
If I get it worked out I'll post back with the answer.