Determine folder access rights

  • Thread starter Thread starter John J.
  • Start date Start date
J

John J.

Before starting a procedure I need to know if the user has at least READ
permissions on a certain folder. I found several ideas on Google but none of
them are suitable. The point is that I don't know beforehand if and which
files are in the folder. Also, when a user has only READ permissions, it is
no use to check if he can write to the folder.

I'm looking for something like Function canRead(strFolder as string) as
Boolean.

How could I achieve this or is it just not possible?

Thank you.
John
 
I would ignore Gina, her answer is to use Jet, no matter how
applicable.

I'd just move to SQL Server and learn a really practical database.
Jet is obsolete and it has been for a decade.

-Aaron
 
I have an app that imports Excel files from different read-only folders (one
folder per department). Some users have read access to every folder, some
only for one. Users have their own app. In the app the user can select one
or more departments. Before the import starts I need to check if the user
has read rights to the specific departement(s) (folder(s)) he has selected.
If he doesn't have the rights, he should be notified and the import is
canceled.
Hope this makes things clearer.
John
 
John,

I have not seen anything that checks the folders permissions from within
Access. I did find a module that will notify you of any chages to a
folder... http://www.mvps.org/access/modules/mdl0053.htm This MIGHT work or
point you in the right direction, if a change is not made that might be all
the notification you need to send a message.

You can check out the entire site http://www.mvps.org/access/ as there might
be something you could use other then the module I found. I looked but who
knows I might have issed it because there is alot of information there.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
Thanks Gina. I'll check it out.
John

Gina Whipp said:
John,

I have not seen anything that checks the folders permissions from within
Access. I did find a module that will notify you of any chages to a
folder... http://www.mvps.org/access/modules/mdl0053.htm This MIGHT work
or point you in the right direction, if a change is not made that might be
all the notification you need to send a message.

You can check out the entire site http://www.mvps.org/access/ as there
might be something you could use other then the module I found. I looked
but who knows I might have issed it because there is alot of information
there.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
m:
I would ignore Gina, her answer is to use Jet, no matter how
applicable.

I'd just move to SQL Server and learn a really practical database.
Jet is obsolete and it has been for a decade.

-Aaron

PLEASE MOVE TO SQL SERVER AND LEAVE THE ACCESS NEWSGROUPS.

Jet is nowhere near obsolete, only an aaron would say so..
 
I have an app that imports Excel files from different read-only
folders (one folder per department). Some users have read access
to every folder, some only for one. Users have their own app. In
the app the user can select one or more departments. Before the
import starts I need to check if the user has read rights to the
specific departement(s) (folder(s)) he has selected. If he doesn't
have the rights, he should be notified and the import is canceled.
Hope this makes things clearer.
John
If you try to open a spreadsheet but do not have read rights to the
folder, Access throws an error message,

All you need is to handle the error and exit the sub.
 
uh... I already moved to SQL Server.. it was actually quite easy.

and that's why I make $100k and you don't!

-Aaron
 
I do check that. But it could be that the file actually doesn't exists, for
instance because the third party export to the folders went wrong. How would
I know the difference?
John
 
by using a real ETL process.

where you get notified (via email) when you have failures.
 
I do check that. But it could be that the file actually doesn't
exists, for instance because the third party export to the folders
went wrong. How would I know the difference?
John

Based on your original definition of the problem and explanation of
what you wanted to do, (see below), knowing the difference would be
irrelevant.

 
uh... I already moved to SQL Server.. it was actually quite easy.

and that's why I make $100k and you don't!

So why did Daddy have to pay the fine for your cyber stalking?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
It is relevant. When the user has no access rights he should get a message
that that is the problem. When the export went wrong and no files exists in
a folder the user has access to, the user should be notified about that.

John

Bob Quintal said:
I do check that. But it could be that the file actually doesn't
exists, for instance because the third party export to the folders
went wrong. How would I know the difference?
John

Based on your original definition of the problem and explanation of
what you wanted to do, (see below), knowing the difference would be
irrelevant.
 
Back
Top