You need to match each IF with an ENDIF - the simplest way is via indents (as you do) AND adding a comment to the EndIf so you know "who it belongs to".
 Code:
IF InOU("FirstOU")
  Do this, and that, and some other things..
ENDIF ; in "FirstOU"


I do this with long blocks of IF/Else/Endif, but if you aren't used to it, or are debugging, it makes sense to add the comments to EVERY If/EndIf pair.

Don't forget, "InOU" is not a Kix function - if you want to check OU membership, you need to write or download a UDF and include it in your code.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D