HelloI was trying to move data from one field to another in an ArcMap 10 layer using Field Calculator and ran into problems. I'm sure it is a syntax thing as I am not that well versed in VB, but Google failed me so I turn to you.

Data in field I'll be moving is formated as:

9500 Lowland Woods Blvd, Any City, Fl 99999

How I want it to look in the new field is:

9500 Lowland Woods Blvd

My first pass was to use LEFT with Instr to identify the limit. I put into Field Calculator:

If anyone could point out my ridiculously simple error I would appreciate it.

People need panic...panic in regular draghts. I read about the governments of the world, and I panic daily. It's a heart pumping workout that keeps my cheeks rosy and my vision crystal clear.Thorax:Pigborn (Brooke McEldowney)

It is far too long since I touched a VB-alike language (and then it was in the form of LotusScript, probably), so do not know for sure if I'm proficient enough with this particular dialect (save that it's readable much like all the rest), but I'll try a quick suggestion in leiu of anyone else having yet posted.

...or maybe "Add( <FOO>, -1)", so the obvious yet normally insanely inconsequential difference between your working(ish) and non-working Left() function is that in every function call except the complaining one has a space between the "FunctionName(" and its parameters...

(Correction, your spoilered version doesn't have that failing, assuming everything else is equal and well-copied. But you can at least check if RESULT being created without the -1 works as per original comma-retaining version, maybe identify some rather awkard type mismatching between position number returned from the InStr( …) and a literal 1 that the subtraction operator can't overload and/or return from correctly.)

...but how strict is the interpreter to types? That's really my basic (NPI!) fall-back answer, even though it has all the appearance of an environment that doesn't really care as long as you don't try to use a blatently non-numeric string for a numeric param.

Thanks for the reply! Right now my ArcMap is tied up processing a new street layer, but when I get a chance I'll try your suggestions and report back.

People need panic...panic in regular draghts. I read about the governments of the world, and I panic daily. It's a heart pumping workout that keeps my cheeks rosy and my vision crystal clear.Thorax:Pigborn (Brooke McEldowney)