Quote: XLookup(@fn, Ship to Zip, "ZipList04!Zip", "Area Code", Ship to Area Code)
This is the function you are using but you don't mention how it is failing. What are the symptoms? No answer, wrong value, 0, error message, other symptoms?
XLU will return a string. If the destination element (Ship to Area Code) is bound to a number field, then you will not get what you want.
You may need to convert the result of the XLU statement to a number like this:
Quote:Ship to Area Code = @ToNumber( @XLookup(@fn, Ship to Zip, "ZipList04!Zip", "Area Code"))
You could also insert an @ERROR command following the XLU statement to verify the XLU is actually working correctly:
Quote:Ship to Area Code = @ToNumber( @XLookup(@fn, Ship to Zip, "ZipList04!Zip", "Area Code"))
IF @ERROR THEN {
.....@MSGBOX("The XLU statement failed.","","")
.....}
ELSE {
.....@MSGBOX("The XLU statement worked correctly","","")
.....}
====================
Above code was modified to include missing "@" in last two XLU examples. Thanks to Ray for catching that.