Nice. I had not used a collection object before. I would not have a primary key at the point of passing back the data (I would probably assign that key when I inserted it into the view in the calling form). Reading the help file, it seems as though you don't have to assign a key - any reason to do assign the key at the time of adding the object to the collection (ease of use later or good design?).
Albert
>
>procedure form.unload
>
>o = create('collection')
>local oRec as Empty
>select ...
>scan
> scatter name oRec memo
> o.add(m.oRec, transform(primaryKey))
>endscan
>
>return m.o
>