Is This Content Helpful?
We're glad to know this article was helpful.
You can use VB If/Then statements to selectivley label features. For example, you want to create a stacked label from the Genus, Species, and Subspecies fields and omit empty values from the label.
Function FindLabel([GENUS],[SPECIES], [SUBSPECIES])
If [GENUS] <> " " Then
TheLabel = "Genus: " & [GENUS]
If [SPECIES] <> " " Then
TheLabel = TheLabel&vbnewline&"Species: " & [SPECIES]
If [SUBSPECIES] <> " " Then
TheLabel = TheLabel&vbnewline&"SubspeciesLabel: " & [SUBSPECIES]
FindLabel = TheLabel
You can stack more than three labels. To do this add fields to the "Function FindLabel()" statement. Then add more IF/THEN tests for each additional field.