A
Ascheman
I am trying to check a field to see if the the first
number is a 2 and if it is then to see if the last item in
the field is and A or a B .... if its an a or b then
select only the 5 right characters and if its not then
select the right 4 characters... I know that my code is
close but as to where to place it I am at a loss. Here is
the code I have to this point.
<cod>
if left(unitnumber,1) = 2 and right(unitnumber,1) = A or
right(unitnumber,1) = b then
unitnumber = right(unitnumber,5)
else
unitnumber = right(unitnumber,4)
end if
</code>
If anyone can help me to get this to working it would be
greatly appreciated.
Thanks in advance.
C. Ascheman
number is a 2 and if it is then to see if the last item in
the field is and A or a B .... if its an a or b then
select only the 5 right characters and if its not then
select the right 4 characters... I know that my code is
close but as to where to place it I am at a loss. Here is
the code I have to this point.
<cod>
if left(unitnumber,1) = 2 and right(unitnumber,1) = A or
right(unitnumber,1) = b then
unitnumber = right(unitnumber,5)
else
unitnumber = right(unitnumber,4)
end if
</code>
If anyone can help me to get this to working it would be
greatly appreciated.
Thanks in advance.
C. Ascheman