Never use "then .. else" naked but instead "then begin ... end else begin ... end" with appropriate indentation (I prefer "end else begin" alone in a single line, but this is a matter of taste :) ; -Michael