Creating a hierarchy attribute

Discussion created by bkionx on Feb 20, 2013
I am trying to create a hierarchy class based on rail line owners, so that we can prefer a specific owner and also prefer other rail lines that the same owner has track rights too. This is what my field calculator looks like for the code block but its not working:

Dim hierarchy as Integer
If [RROWNER1] = "CSXT" Then
hierarchy = 1
Elseif [RROWNER1] = "UP" OR [TRKRGHTS1] = "CSXT" Then
hierarchy = 2
hierarchy = 3
End If

Followed by Hierarchy = hierarchy in the bottom field. Please help!