Richard,
>Still puzzled, this is the part where the error occured , in the default part .... the first 2 lines were executed not the third.
Well, it is all actually only one line as far as the compiler is concerned, so I am wondering what makes you think it is erroring where you say it is?
James