>Hilmar,
>
>I don't understand exaclty what you are trying to do...
The final objective is to create a temp table, based on the information the user sees on the grid. Current filter and order should be respected.
COPY TO looked excellent - until VFP told me that a "table expression" or something is required - IOW, a field from the current table. Related fields and UDFs() don't work.
I will probably go with Sergey's suggestion (use a SELECT statement, and capture the current filter and sort order) - COPY TO simply doesn't work in this case.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)