TEXT... ENDTEXT or SET TEXTERMEGE can Help you to do it.
SET TEXTMERGE TO lcFile NOSHOW
SCAN
\ <<YourFistField>>, A literal... <<YourSecondField>>
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
>The job I need isSelect client
go top
frec = recno ()
>Get all the records in table product which is related to the
the record in the parent table
>store to a txt file ( the txt file name will be named &frec)select client
store skip + 1
>Get all the records in table product which is related to the
the record in the parent table
>... until the end of the table clientes