leandroarb

Suppressing msg error "wrong string value" or "maybe too large for the field"

Discussion created by leandroarb on Oct 30, 2012
Latest reply on Oct 31, 2012 by m.gasior
Hi everyone, this is my first post here, but I am an enthusiast of ESRI Forums since Arcgis 3.x! :cool:

I am doing some calculations with some shapefiles, but sometimes I am receiving the annoying message: [ATTACH=CONFIG]18833[/ATTACH], showing the error message "value may be too large for the field" or "trying to add a string to a number field".

Ok, the destination field type is 'DATE' and I know that the results COULD BE COME in string. Because of that, I wrote an "else" in the codeblock (bellow) to avoid this kind of error, but isn't working!

[INDENT]Dim MyCode
If [DATEFIELD] <> "STRING TEXT" Then
MyCode = [DATEFIELD]
Else
MyCode = null
End if[/INDENT]

Anyone knows how to prevent this warning messages or can help to improve my simples codeblock to avoid that messages?

Attachments

Outcomes