Try ELSEIF instead of ELSE IF.
What you code says is
DO WHILE ??
IF counter = 0 THEN
'do something
ELSE
IF counter = 1 THEN
'do something
ELSE
'do Something
END IF
objRS.MoveNext
LOOP
The loop above comes before the end of the first IF statement
======================================
They say, best men are moulded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
|