None of the above.

You cannot construct the code in the way you are trying. Every "IF" must have an "ENDIF", every "ELSE" must have an "IF".

You'd be better off looking at "SELECT /CASE / ENDSELECT" for complex conditional constructs.

code:
Select
CASE expression1
statements;
CASE expression2
statements;
CASE 1
default statements;
ENDSELECT

[ 01 November 2001: Message edited by: Richard Howarth ]