Here is the way that works for me to set and change variables: (This is a snippet from in use production code. It calculates a running total for items on an order.) ... <dtml-call "REQUEST.set('otot',0)"> <dtml-in "Query.OrderItems()" sort=sord> <dtml-let n_otot="otot + (quantity*unitprice)"> <dtml-call "REQUEST.set('otot',n_otot)"> </dtml-let> ... </dtml-in> ... </td><td align="right"><b>Total:</b></td><td><dtml-var otot fmt=dollars-and-cents> ... __________________________________________________________________ Jim Sanford ^ Database Engineer ^ ^ ^ Accelerated Technology, Inc. ^ ^ 720 Oak Circle Drive East ^ ^ ^ Mobile, AL 36609 ^ ^ ^ Voice: 334-661-5770 fax: 334-661-5788 ^ ^ E-Mail: jsanford@atinucleus.com Web: http://www.atinucleus.com Source Code, No Royalties, Any CPU...It just make sense ! __________________________________________________________________