Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 39
  • Last Modified:

How lock users out of the tables, queries, reports, etc.

Is there a way to lock users out of the objects in the navigation pane?  I thought that by splitting the database and saving the front-end file as an accdb file this would work but I guess it doesn't.

Any tips?
0
SteveL13
Asked:
SteveL13
  • 2
2 Solutions
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
A bound and determined can get at things, but you can make it very difficult.  First your app should always be split, even if it's single user.

 Then distribute the "front end" as a MDE/ACCDE and turn off the database container and menus.  Force it into runtime mode by adding code at startup that quits if the app is not running that way.  

 That locks them out of all the design features, and because it is a MDE/ACCDE, they can't get at to code either.

Jim.
0
 
SteveL13Author Commented:
Jim.  Ok.  But questions:

1)  How do I turn off the database container and menus.  

and,

2) How do I force it into runtime mode by adding code at startup that quits if the app is not running that way.

--Steve
0
 
PatHartmanCommented:
If your users are not sophisticated, simply renaming the FE from .accde to .accdr will prevent them from entering design mode on anything.

PS  - Be very careful when using  an .mde/.accde that you retain the original .accdb in a safe place.  There is no easy way to recover the .accdb from an .accde.  There are services but you won't necessarily like what you get.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<1)  How do I turn off the database container and menus.  >>

 Start up options:   File, Options, current database, Un-check "Display Navigation Pane".

The menus are not available in the runtime version.

<<2) How do I force it into runtime mode by adding code at startup that quits if the app is not running that way.>>

If SysCmd(acSysCmdRuntime) = False then Application.Quit

Or

If SysCmd(acSysCmdRuntime) = False then
  MsgBox "This application can only be executed in runtime mode", vbOKOnly+vbCritical
  Application.Quit
End If

 If you want to message the user.

Jim.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now