A while ago I copied this code from a forum post and have used it to trim ownernames down to 13 characters ever since.
I've also developed a definition query to leave historical parcels, with an entry in a History field, out of an an active view.
I am trying to put these 2 bits of code together for a large project - hence the second line below. This addition is only creating an error and I've dinked around with it to no avail.
Function FindLabel ( [TylerFileTable.OWNERNAME] , [Owners.History] )
If [Owners.History] = " "
Owner = [TylerFileTable.OWNERNAME]
if InStr ( 1 , Owner , "," ) > 1 then
MyPos = InStr ( 1 , Owner , "," )
DisplayChars = Left ( Owner , MyPos + 2 )
FindLabel = DisplayChars
else
FindLabel = Left ( Owner , 13 )
end if
End Function
I also have a number of Owner names that get past the code and I'm wondering how to catch them.
I am no programmer; I took a class one time and decided there was no logic in my head. A couple of the extra long names, Four Mile Livestock and McStay Brothers (?!) are examples that are longer than 13 characters on the screenshot attached.
If anyone could make some suggestions as to get this project done, I will be forever grateful.
I've also developed a definition query to leave historical parcels, with an entry in a History field, out of an an active view.
I am trying to put these 2 bits of code together for a large project - hence the second line below. This addition is only creating an error and I've dinked around with it to no avail.
Function FindLabel ( [TylerFileTable.OWNERNAME] , [Owners.History] )
If [Owners.History] = " "
Owner = [TylerFileTable.OWNERNAME]
if InStr ( 1 , Owner , "," ) > 1 then
MyPos = InStr ( 1 , Owner , "," )
DisplayChars = Left ( Owner , MyPos + 2 )
FindLabel = DisplayChars
else
FindLabel = Left ( Owner , 13 )
end if
End Function
I also have a number of Owner names that get past the code and I'm wondering how to catch them.
I am no programmer; I took a class one time and decided there was no logic in my head. A couple of the extra long names, Four Mile Livestock and McStay Brothers (?!) are examples that are longer than 13 characters on the screenshot attached.
If anyone could make some suggestions as to get this project done, I will be forever grateful.