>>
IF ALLTRIM(m.DZp) <> "MX" AND m.DZp <> "00000"
>> fd=AT(",", m.DCiSt)
>> IF fd = 0
>> mEr = mEr + nb + "Cannot Determine Destination State"
>> ELSE
>> mCity = ALLTRIM(LEFT(m.DCiSt,fd-1))
>> mState = ALLTRIM(SUBSTR(m.DCiSt,fd+1))
>> IF NOT mState $ StStr OR LEN(mCity) < 3 OR m.DCiSt = "Unknown"
>> mEr = mEr + nb + "Cannot Determine City, State of Destination"
>> ENDIF
>> ENDIF
>> ENDIF
>>
>>To me it looks like it's looking for a Mexico address that includes the city and zip code all in one line and parsing/splitting it out if it finds it. I'm having issue figuring how exactly the mEr is called upon, can someone help?
>
>Actually, I think it's looking for an address not in Mexico and parsing city, state and zip from it. mER holds an error message, but the code you showed doesn't do anything with that error message.
>
>Tamar
The error is dealt with in another portion of the code, basically a hidden display box looks for it to contain a message and displays it if there is one.
I see what it's doing for the error now, thanks. I'm still confused as to what actually happens when it does find MX or 00000 in the Dzp field though...
Basically this is used for data entry dealing with addresses, and if someone types in a destination/zip that isn't recognized by the rest of the code, this error is thrown. In this case someone entered "VI" for Virgin Islands and "VI" isn't included in the states list (StStr variable) so that's why the error is being thrown. I'm just confused about the whole Mexico thing now.