Well my UDF does perform the SET local to the UDF. It set the options "ON" and then reverts to the original seting that existed before the UDF (PadStr) was called.

I am not quite sure where where the implementation is different from your description.
_________________________
Home page: http://www.kixhelp.com/hb/