This document illustrates creating stacked labels based on a single field. For example, a field with both city name and state name, such as "Anchorage Alaska", will be labeled as follows:
City: Anchorage State: Alaska
This method does not work well for values with more than one space. For example, "Los Angeles California" will be labeled as:
City: Los State: Angeles California
For values that do not contain a space, it will not label the feature.
Function FindLabel ( [City_State] ) Dim theString, LeftStr, RightStr, ThePos theString = [City_State] ThePos = Instr(theString, " ") - 1 LeftStr = Left (theString, ThePos) RightStr = Right (theString, Len(thestring) - ThePos) FindLabel = "City: "&LeftStr&VBNewLine&"State: "&RightStr End Function
Note: When using this code on your table, replace both occurrences of the City_State field name with the name of the field in your table.