Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

sample code to create and drop a link to an external DB table.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wisconsin Bob - 09 Jan 2006 16:45 GMT
In order to prevent someone from opening the FE DB (by using the Shift key
technique) and changing data in a linked table, I would like to set up the
link in code when the FE is opened and drop the links when the FE is closed.
I have not been able to find how to do this in VBA.

If you know a better technique, please let me know.

Thanks,
Bob
Marshall Barton - 09 Jan 2006 17:22 GMT
"Wisconsin Bob" <Wisconsin Bob@discussions.microsoft.com>
wrote:

>In order to prevent someone from opening the FE DB (by using the Shift key
>technique) and changing data in a linked table, I would like to set up the
>link in code when the FE is opened and drop the links when the FE is closed.
>I have not been able to find how to do this in VBA.

A couple of ways to think about.

Since a linked TableDef doesn't contain much information
beyond its Connect property, you can just delete the
TableDef when you close your app and recreate it (using
TransferDatabase or DAO methods) in your startup procedure.

An alternative is to not have a TableDef for the linked
table and use a query that specifies the backend table using
IN "same as Connect property"  in the query's FROM clause.

Signature

Marsh
MVP [MS Access]

Wisconsin Bob - 09 Jan 2006 17:51 GMT
Adding TableDef code looks like what I need. I will try it.

Thanks,
Bob

> "Wisconsin Bob" <Wisconsin Bob@discussions.microsoft.com>
> wrote:
[quoted text clipped - 14 lines]
> table and use a query that specifies the backend table using
> IN "same as Connect property"  in the query's FROM clause.
Tim Ferguson - 09 Jan 2006 17:24 GMT
"=?Utf-8?B?V2lzY29uc2luIEJvYg==?=" <Wisconsin
Bob@discussions.microsoft.com> wrote in news:73A5EB76-A8A5-453D-AC62-
BF07B92E41BE@microsoft.com:

> If you know a better technique, please let me know.

Access user-level security. You know it makes sense.

HTH

Tim F
Wisconsin Bob - 09 Jan 2006 17:50 GMT
Tom,
I'm thinking that user level security would be used at the time the link is
initially established in the FE application. Then if the FE is saved with
this link established, anyone could open the FE and open the linked table.

Am I wrong about this?

Bob

> "=?Utf-8?B?V2lzY29uc2luIEJvYg==?=" <Wisconsin
> Bob@discussions.microsoft.com> wrote in news:73A5EB76-A8A5-453D-AC62-
[quoted text clipped - 7 lines]
>
> Tim F
Tim Ferguson - 10 Jan 2006 17:10 GMT
"=?Utf-8?B?V2lzY29uc2luIEJvYg==?="
<WisconsinBob@discussions.microsoft.com> wrote in
news:9FB69D05-19BE-4650-A935-994849A60DEA@microsoft.com:

>> > If you know a better technique, please let me know.
>>
[quoted text clipped - 6 lines]
>
> Am I wrong about this?

Really, it should be a design-time decision; at least it's an early
implementation consideration. The overall plan in a nutshell is to:

+ remove _all_ privileges from users on the tables and
 everything in the back end.

+ define queries that allow users to write/ see the data
 they need, and give the queries Run With Owner
 Permission. This means that the queries run with your
 access level (e.g. Admin) so that the users can do what
 they need to. The users have read and write permission
 on the queries (i.e. they can interact with the data),
 but not design (so they can't rewrite the query itself).

+ In the front end, the users need to be able to see the
 various GUI objects like forms etc, but not design them
 or create new ones.

Bear in mind that you need to read all the instructions before securing a
database in Access -- at worst you can lock yourself out of your own
data; and it's easy to leave holes too. Once it's working, though, it's
pretty secure against anything less than a really determined effort. If
you absolutely have to lock up everything, then you need a proper RDBMS.

Look here for more info:

http://support.microsoft.com/kb/q165009/
http://www.vb123.com/toolshed/00_accvb/accesssecurity.htm

Hope it helps

Tim F
Wisconsin Bob - 10 Jan 2006 17:23 GMT
Tim,

Excellent! I agree totally.  

Thank you so much.
Bob

> "=?Utf-8?B?V2lzY29uc2luIEJvYg==?="
> <WisconsinBob@discussions.microsoft.com> wrote in
[quoted text clipped - 43 lines]
>
> Tim F
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.