export with difffernt file name

  • Thread starter Thread starter GG
  • Start date Start date
G

GG

Hi all,

Urgent.
Could anybody tell me how to:

I got a database and a query. the query can find out all
the related info of the companies from tables (let say
100).

Now I want to press a button so that the individual co.
report can be exported to a file with different file name
everytime. e.g. file of company 1 will be 1.txt, company
2 will be 2.txt etc.

Pls help
GG
 
Yes you can do that. I think the best way is to use VBA.

You need to use a for loop with the
command "docmd.TransferText" for every record in the
company table.

If you need more details, please send me the Table Name,
Structure, and all the details you have, and if you can
send me a file attachment, it will be better.

Regards ...

Tarek Faham
 
Hi Tarek,

Thanks, but I do not know VB at all. Trouble.
here is the detials:
The report is like a query that gather information that
related to a company from a few tables (Company /
Contact etc).
The report called company report which generated from
the forms called company / contact.

The report will gather the company info once a company
code is input.

Pls help

GG
 
Back
Top