Thanks, I'm still trying to get my head around all the different looking code and that the "while" bit appears to have moved from the bottom of the block to the top now so I don't know how much of that old code block I can just borrow and change the obvious bits or if it all needs re-doing.