Link to home
Start Free TrialLog in
Avatar of Tom Crowfoot
Tom CrowfootFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Move entire folder from MS Access

Dear Experts

I am building an HR database in Access & one of the features I want to have is the ability to move an employee's folder when they resign.

An employee's folder will typically have 1/2 a dozen subfolders and lots of different file types stored within

A typical move would be:

from:
C:\Users\xxx\HR\Current Employees\Individual HR Files\Jo Bloggs-1\

to:
C:\Users\xxx\HR\Ex Employees\Individual HR Files\Jo Bloggs-1\

Can anybody help?
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just a note -

The code in that article uses the File Scripting Object library, so you would have to add a reference.

From the VBA Editor:

Tools -> References , check Microsoft Scripting Runtime


Edit:

Actually never mind the reference.  The code uses Late Binding, so an explicit reference is not needed.
Avatar of Tom Crowfoot

ASKER

Brilliant - thank you very much
correlate,

The code that capricorn1 posted is exactly what is in the article I linked to.

The difference is that the function in the article contains some additional checks to ensure that the paths specified are valid for those operations.
Hi mbizup,

Apologies for that - in my haste I overlooked that - simply saw capricorn1's code there, tried it & it worked - very happy to reallocate as that would seem fairest.
Thanks... if you click the request attention button a mod can reopen it for you.
Excellant - thanks for your help