How to change default export locaton for reports ?

Nilay

Registered User.
Local time
Tomorrow, 02:06
Joined
Feb 17, 2009
Messages
18
When I export a Report to txt file, by default it is exported to 'User/My Documents' folder on C drive. For my application, I want the file to be exported to the same folder which contains the database. Is this possible ? I guess (and hope) it would be as simple as executing some code for relative path before the export; just don't know the code. Help appreciated and badly needed. Thanks.
 
that location is currentproject.path

you can set the export to be saved to a file in that folder in code, when you use docmd.transfertext
 
I'll require slightly detailed help. I'm not using docmd.transfertext but plain simple macro in Access 2010 (screenshot attached). (Can I export report with docmd.transfertext ? - on searching found that this has an argument 'tablename', so I presume that only tables can be exported by this). If you can paste a single line / few lines of code, I'll play with it and develop it further for my need. Thanks.
 

Attachments

  • access-export.png
    access-export.png
    4.5 KB · Views: 373

Users who are viewing this thread

Back
Top Bottom