Renaming input file

  • Thread starter Thread starter Tom Knox
  • Start date Start date
T

Tom Knox

I'm trying to rename an input text file from my C drive on my PC prior to
transferring to file to my Access application. How do I define the file so
that I can use the docmd.rename in a function.

Thanks for any help

Tom
 
Use the statement in VBA:
Name <OriginalPathAndFilename> As <NewPathAndFilename>

For example:
Name "C:\Test.dat" As "C:\MyFolder\Test.txt"

Not sure what you mean by "define the file"?
 
I thought I had to define it somewhere in my Dim and Set statements. But
your solution worked!! Thanks alot.

Tom Knox
 

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

Similar Threads

rename a form in an external database 2
error 3078: 5
Error with DoCmd.Rename 5
CANCELED PROCEDURE 4
database engine couldn't lock a table 3
Renaming a diagram 1
Rename a table 5
close / rename linked .mdb file 20

Back
Top