roymol

Calculate Field VBA Statement If...Then...Else Error

Discussion created by roymol on Nov 16, 2011
Latest reply on Nov 16, 2011 by kenbuja
Hi,

I am not able to use an If Then Else function in my field calculator.
I've looked up loads of discussions on this forum and tried several options.
Even a basic function will not work.
Am I doing something wrong, do I have a version of AG that doesn't support this anymore or is there something else?

I'm using Arcmap 10 service pack 2 and trying the next function in my field calculator:

Pre logic script code:
Dim output as Double

If [OBJECTID]=2 Then
output = 565
Else
output = 6
End If

Field value:
output


Error code 999999 -> so that's not very helpfull...

Anyone an idea?
Thanks!
Roy

Outcomes