Need Current Path to import TXT file

B

Birk Binnard

The TransferText command requires passing the full path and filename of
the TXT file to be imported. My users put the text file in the same
folder as the Access application itself. But how do I get the path name
of that folder?

The CurDir function does not do it. That function seems to return either
the computer's default path or the path to My Documents, neither of
which is what I need. The Access application is located on a mapped
network server drive and I have currenrtly hard coded the path into the
TransferText parameter string. But if teh drive mappings change I'm in
trouble.

I thought the Application object would have the proper path in it
somewhere, but I can't find anything like that there. Is there
someplace else I shoudl look?
 
K

Ken Snell [MVP]

This will tell you the path where your "front end" application file is
located:
CurrentProject.Path
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top