Try
select products
SCAN WHILE products.id = client.id
ENDSCAN
>The parent table is client (fields id and name)
>
> The child table is products (fields product and id)
>
> I've created a relation and a form with 2 pages
> The first page has the client data and the second page has a grid
> with the products of the client
>
> It works nice
>
> I created a button to pass the products of a client to a txt
>
> select products
> skip + 1
> store product to line
> ** do record_txt.prg
> skip + 1
> store product to line
> ** do record_txt.prg
>
> The problem is that the child table is not limited to the
> relation with the parent table as the grid is
> All records go to the txt.
> I need only the records related to the client that the
> I am now in the child go to txt
> How can I do ?
--sb--