now I did rename the hole feature could this be the reason it's not working.
Here is a screen shot to show error
Holes I would like to have count if active and remove from count if inactive
its the for each statement that you supplied..
Here is the model
Im not sure why it didnt work first time, I re copied the code back in and now its working.
I also added a line that checks if the last char of the hole name is a number - if it is a number then it doesnt get added to the count.
Hope this works OK for you.
Thats it great thanks...
Just guessing but you where probably just missing the "End If" statement right above the Line that says "Next HFeature". If you where wondering why it wasn't working the first time.
PS - Thanks for the link to this on my post.