File Moving Using Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,

I have a question about moving files from one folder to another using MS
Access. Here is the Scenario:

Our company has a database that is tracking tests run by several
departments. Test requestors are required to place a test writeup file (ms
Word Doc) in a folder on the network drive called " Submit Tests Here". The
database, when opened, looks in this folder and puts hyperlinks to those
files into a table called "Test Proposals".
After a test write-up is reviewed and accepted, an "Accepted" field in the
"Test Proposals" table is changed from "NO" to "YES".

When the test is accepted, I would like to CUT the writeup file from the
"Propose Tests Here" folder, append the autonumber to the file name, and
PASTE the file into another folder called"Accepted Tests".

Any Ideas on how to do this?

Thanks for your help.

Carlos
 
Carlos said:
Hello All,

I have a question about moving files from one folder to another using MS
Access. Here is the Scenario:

Our company has a database that is tracking tests run by several
departments. Test requestors are required to place a test writeup file (ms
Word Doc) in a folder on the network drive called " Submit Tests Here". The
database, when opened, looks in this folder and puts hyperlinks to those
files into a table called "Test Proposals".
After a test write-up is reviewed and accepted, an "Accepted" field in the
"Test Proposals" table is changed from "NO" to "YES".

When the test is accepted, I would like to CUT the writeup file from the
"Propose Tests Here" folder, append the autonumber to the file name, and
PASTE the file into another folder called"Accepted Tests".

Any Ideas on how to do this?

Thanks for your help.

Carlos

You could use the VBA Name Statement, equivalent to Rename in DOS. From F1:

Name Statement
Renames a disk file, directory, or folder.
Syntax
Name oldpathname As newpathname


HTH
 
Use VB/VBA keyword "Name" to move disk file from one location to another:

Name "C:\MyFolderA\myDocument.doc" As "C:\MyFolderB\myDocument_0001.doc"

Of course, the user account that is running your Access app must have
approppriate permission on the two locations.
 
if you were using an Access Data Project then it would be easy to do
this from the server-- via a super-user for example

Access MDB is obsolete

-Aaron
 
Back
Top