hi again Khawar,
I attached my database, table documentos (like invoices) and documentoslinhas (details of invoices) are attached tables from access2.0 database.
The purpose of it all is to gather all invoices from the details that are from a specific customer, then export all to a txt file with header and footer and the details on the midlle (i already made the code for the header in a module)
What i did is query the documentoslinhas to create a new table, then create a update query to fill the data i need. What is missing is the relation from the details to the header (invoice number)
Also how to get it all in one text file.
Thanks,
Luis