>I have a code that use 15 characters. P.e A97170000001234, I need to apply a function that return a six characters unique value for each code. The retuned code must be a six digits code. Who has any idea about any kind of functions that I can use for this operation. The max code returned will be 999999.
>Any idea thanks.
Juan,
You can create a translation table with two fileds: OldCode C(15) and NewCode C(6). Than in your UDF you will do seek on old code and get new code from the table.
--sb--