I've got a parcel feature class in ArcGIS 10. Some of the parcels were in the shapefile when I got it. Others I've added after importing the shapefile to a feature class in a personal geodb.

I want to change the font color to white. The code below works for the features I've added, but not for the ones that already existed. For those, the label displays with the code displaying also, and no color change. I don't know why the code would work for some features but not others.

The only difference I can think of is that the original shapefile that I received was probably created in ArcGIS 9, maybe earlier.

Any suggestions on how to get them all to display with the formatted label? Thanks.

Function FindLabel ( [F_NAME], [L_NAME] , [Min_Owner] , [Exp_Date] , [Option_Yrs]  )
  If Not IsNull( [Min_Owner]) Then
    FindLabel = "<CLR red='255' green='255' blue='255'>" & [Min_Owner] & vbnewline & [Exp_Date] & " + " & [Option_Yrs] & "</CLR>" 
    FindLabel = [F_NAME] & " " & [L_NAME] 
  End If
End Function

2 Answers 2


According to the help topic Building Label Expressions, only < and & are special characters and they can be escaped using HTML-style escapes, i.e. &lt; and &gt;. The comma shouldn't create a problem and if it does, it may be a bug.


Hmm, mystery solved. There was a comma the value in [Min_Owner]. That apparently threw the code off. Being able to escape that would be nice, but it works well enough for now.

  • 1
    You may want to choose this as the correct answer so the Community bot stops bumping it up to the front page.
    – Patrick
    Commented Aug 18, 2011 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.