Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question

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.

share|improve this answer

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.

share|improve this answer
You may want to choose this as the correct answer so the Community bot stops bumping it up to the front page. – Patrick Aug 18 '11 at 17:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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