Select to view content in your preferred language

Label Expression

2599
2
01-15-2013 11:49 AM
CaraMays
Deactivated User
Below is my current expression that is labeling landowner names, abbreviated to the first letter of their first name with a comma dividing the first initial with the last name.

I would like to add the PID directly below the name. I would like the PID to have the same label characteristics as the name or "PartyName" does.

Can anyone else where to add the PID and how to correctly format this. THANKS!

Function FindLabel ( [PartyName] )
if InStr( [PartyName] , ",") > 0 Then
  myArray = Split( [PartyName] , ",")
  FindLabel = myArray(0) & ", " & LEFT(Trim(myArray(1)), 1) & "."
ElseIf Len( [PartyName] ) > 13 Then
  FindLabel = Left([PartyName], 13)
Else
  FindLabel = [PartyName]
End If
End Function
0 Kudos
2 Replies
WadeLobb
Regular Contributor
Try

Function FindLabel ( [PartyName],[PID] )
if InStr( [PartyName] , ",") > 0 Then
myArray = Split( [PartyName] , ",")
FindLabel = myArray(0) & ", " & LEFT(Trim(myArray(1)), 1) & "."
ElseIf Len( [PartyName] ) > 13 Then
FindLabel = Left([PartyName], 13) & vbCrLf & [PID]
Else
FindLabel = [PartyName] & vbCrLf & [PID]
End If
End Function
0 Kudos
CaraMays
Deactivated User
This only shows the landowner name. 😞 Thanks though! I will keep trying.
0 Kudos