From what you posted, you don't have an ENDIF in your code.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's