Please add Code Tags to your code extract in your OP, as jaslake has requested, before we continue with this.

Thanks, TMS