I have tried the LIKE operator in VB but the error message is always 99999 (general error) I tried may different ways but the same result. If I type the SPCOMP code in exactly then it works.
(ie: if [SPCOMP] = 'Sb 90Bf 10')
I tried the python but it does not work either. I never used python before and don't understand it either. Maybe I should though.
And yes the string is exact (it's either SB or Sb but never both in the same file.)
in the VB calculator, this is my code
Dim SB
if [SPCOMP] LIKE '%Sb 100%' Then
SB = 100
elseif [SPCOMP] LIKE '%Sb 90%' Then
SB = 90
elseif [SPCOMP] LIKE '%Sb 80%' Then
SB = 80
elseif [SPCOMP] LIKE '%Sb 70%' Then
SB = 70
elseif [SPCOMP] LIKE '%Sb 60%' Then
SB = 60
elseif [SPCOMP] LIKE '%Sb 50%' Then
SB = 50
elseif [SPCOMP] LIKE '%Sb 40%' Then
SB = 40
elseif [SPCOMP] LIKE '%Sb 30%' Then
SB = 30
elseif [SPCOMP] LIKE '%Sb 20%' Then
SB = 20
elseif [SPCOMP] LIKE '%Sb 10%' Then
SB = 10
else
SB = 0
end if
in the lower box (SB=)
SB
I posted my .gdb here as a zip file.
https://drive.google.com/file/d/0B3tBBFkFiMrIMktNaThKQ1ZkdEk/view?usp=sharing