>Thanks Cathy, that combination seems to do it.
>
>At first I placed the two UDFs in the "On Entry" and "On Exit" of the group header. That didn't work. Then I put the second UDF, which sets the insert code, into the "On Exit" of the Group footer and that did the trick.
>
>As usual, we can almost always depend on the UT.
>
>Thanks again,
>Dave
Great! I'm glad it worked for you.
Cathy