Network Security Permissions

PearlGI

Registered User.
Local time
Today, 13:09
Joined
Aug 30, 2001
Messages
125
Here's the scenario:

I have a routine in Access that outputs a series of reports as .rtf files into a directory on a network. It then changes all of the file attributes of these files to read-only.

This is successful in preventing users from changing the reports, but this doesn't prevent them from (knowingly or otherwise!) saving their own versions of the report into the same directory.

I can change the attributes of the directory to read-only using VBA, but this doesn't appear to have any effect.

However, if I manually change the directory permissions to Read from Full Control using NT Explorer this does exactly what I need, BUT I need to be able to repeat this using VBA?

Two questions:
1. Is this possible using VBA?
2. Can anyone provide any sample code?
 
Your network guys should be able to modify the folders security permissions to limit those (users) who you want to be able to add, edit, or delete the files in that folder.

HTH
 
True, our network guys could do this (eventually!).

However, this doesn't give the required solution.

Any number of users have the ability to generate these reports from a shared database and it is these users I want to prevent from amending / creating reports once exported.

Therefore, it's the database itself that has to change the directory permissions.
 
Thanks for that link.

The code works, but only on a directory currently set as 'Full Control'.

i.e. I can change from 'Full Control' to 'Read', but once set as 'Read' I can't change it back. (Manually via NT Explorer works though)

Any ideas what the problem might be?

Unfortunately, I have to have the ability to switch the permissions back-and-forth so the reports can be updated.
 
Sorry, I have never used that code, I just found it while researching another problem and I remembered your posting.

Maybe somebody else out there has some experience with changing network permission's using VBA.

Good luck!
 

Users who are viewing this thread

Back
Top Bottom