Hi Bruce
The method I use (and would recommend) is the one in 14.3, because it
*always* works, no matter what the permissions on the backend tables.
Note that allowing all permissions on the linked tables in the frontend
does not grant permissions to the *data*. It just allows the user to
delete and relink the tables.
Yes, you're right, user-level security can seem like an "impenetrable
thicket", but if properly implemented it works well and is sufficiently
secure for most applications. I am one among many who are very
disappointed that it has been canned in A2007.
--
Good Luck
Graham Mandeno [Access MVP]
Auckland, New Zealand
I have full permissions for all users on the BE tables, and table
permissions restricted in the FE depending on the group. The Users
group has no permissions anywhere. I think that means some variant of
the code in 14.1 of the FAQ would work (which seems to be the same
general idea as the code at the mvps web site, I think).
I have to say I marvel anew at the Security FAQ each time I see it. It
is an almost inpenetrable thicket, further impeded by instructions and
information going back to Access 2.0.
Since I do not have RWOP queries I think I can use RefreshLink. The
FAQ states:
"The best way to implement this [it is not clear in context to what
"this" refers; maybe it means restricting access to the data, or maybe
RWOP] is to remove ALL permissions from the underlying table(s) and use
only queries to get at the data you want your users to have."
But later is seems to suggest that full permissions can be assigned to
the tables in the destination database. It would help if I knew
whether the destination database is the link's destination (i.e. the
BE) or if "destination" means something else.
Anyhow, I have not found a need for RWOP queries, so I think I'm OK
with RefreshLink. If I have a problem that could be solved through the
use of RWOP queries I have not been able to identify that a RWOP query
is what I need. I think Joan Wild has some more information about this
on her web site. Yet another thing to sort out.
I do appreciate your pointing this out. I have to say, though, that it
will take a lot of development time I do not have right now to sort out
how to read the correct path from an ini file or somewhere, check the
existing link against that, and refresh the link if need be. For now
the users will get an error message, and I will fix it. I wish there
was another way, but a better solution will have to wait.
Hi Bruce
Finally, if you use user-level security then I recommend you read the
section on linked tables (section 14) in the Access Security FAQ:
http://support.microsoft.com/support/access/content/secfaq.asp
--
Good Luck
Graham Mandeno [Access MVP]
Auckland, New Zealand
I declare every variable. I have chosen Option Explicit as the
default option, so Access won't let me implicitly declare. It has
been a great help with debugging.
I didn't know that about using an extension other that mdb for BE
files. ABE is not a registered file type on my machine, so I suppose
that means I would need to add it. I use user-level security for my
split databases (which is all of my newer ones), so a user who
attempts to open the file, either FE or BE, by double clicking the
icon will receive a message about insufficient permissions. The only
way in is through a shortcut that temporarily joins the user to the
secure workgroup file.
Thanks again for the information. This is an area of Access with
which I have had little experience, due in large part to a lack of
information. I have lots of information now, so I can work on gaining
experience.
Hi Bruce
Yes, you should Dim dbBE as DAO.Database. (It could be declared as
Object, but every database should have a reference to DAO anyway, so
early binding is faster and gives better compile-time checking.) In
any case, it will need to be declared.
BTW, EVERY variable you use should be declared. using implicit
declaration is asking for trouble. EVERY module, including Form and
Report modules should have Option Explicit at the top.
The path to the backend is just that - the full file path - for
example:
"\\MyServer\SomeShare\My App Folder\Back-end file.mdb"
BTW, there is no law that says an Access database must have the
extension "MDB". All my backends are .ABE files (Access Back-End).
It at least discourages users from double-clicking on them to open
them!
--
Good Luck
Graham Mandeno [Access MVP]
Auckland, New Zealand
I'll give that a try when I have a chance to get back to it, which
may not be tomorrow. Two more questions for now: Is there any
need to made the dbBE variable a DAO.Database? And is the path to
the back end a path first to the Access executable, followed by a
switch that includes the path to the BE (like with decompile,
etc.), or is it just a direct path to the BE file?
BTW, I don't think I have a project so far with more than maybe 20
tables in a single BE database.