"It will be helpful what output you are getting what you are expecting and the input you are feeding. Also where is it you are checking the output, assuming inside the query loop as you initializing your variable "line" inside the loop.
Also I would initialize UnitNo variable right after the line variable." Wesley hit the target on the head. It had not reached my conscious mind that I was working with un-scoped query record set values here, and that I needed to either copy the record set value into a local variable or modifiy the record set with querysetcell(). The joys of jumping back into 5 year old code. Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278345 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

