Results 1 to 6 of 6
  1. #1
    somm is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    8

    Exclamation Lock back-end DB with VBA

    Hi,

    I split the Db into back-end & Front-end. Problem comes here is the user is able to view tables and modify them from Back-end. So, i tried to lock back-end in exclusive mode but when i'm using front-end queries and forms it is giving error like "3031". Is there any way to lock/unlock back-end DB using VBA from front-end.



    Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I usually disable the AllowBypassKey and put a "Quit" form in the AutoExec Macro.

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by RuralGuy View Post
    I usually disable the AllowBypassKey and put a "Quit" form in the AutoExec Macro.
    so do I Allen. laugh. Is there any other way to do it though? Have you heard of another way by chance?

  4. #4
    ZMAN is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    3

    Cool Lock back-end table

    Where is the be stored (on a network?) On one computer with many users? What?

  5. #5
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Ideally, I'll use SQL Server tables.

    Another trick I use is to design a form that opens (maximized) on startup that 'looks' like the table listing. Once it's clicked on though, the mdb quits. I'll also put in some code so that when the backend is opened, it logs to a table with the user's loginID and date/time. This usually stumps a typical user and I'll notice the attempts (I also have it automatically send me an email with the user's name when the backend is opened.) A user typically tries to initially open the backend without the shift key and then uses the shift key if they can't get to the tables. If I then see the user's loginID and Date/Time they opened it (or an email), I go have a chat with them and discuss the importance of only using the frontend (telling them the exact date/time they tried to open the backend is usually enough to scare them from attempting it again.)

    Typically what I do is have a MainMenu.mdb which has buttons to open any of the FrontEnd mdbs and I bury the backends in a folder the user wouldn't normally go to.

    Another option is to implement MSAccess security on the backend.

    Attached is an example of a fake background. It's main purpose is to capture who's trying to open the backend since no users should ever be attempting to open the backend. Once they open this mdb (typically without using the shift key the first time), you'll then know who that person is and the date/time (even though they may open it again using the shift key.)

  6. #6
    somm is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    8
    Thanks for suggestions. I'll try it in my DB.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Exclusive access/DB lock
    By Boru in forum Access
    Replies: 18
    Last Post: 07-28-2014, 01:38 AM
  2. How to TRULY lock access to tables
    By is49460 in forum Security
    Replies: 20
    Last Post: 02-01-2013, 03:41 PM
  3. File Sharing Lock Exceeded
    By creditman in forum Access
    Replies: 1
    Last Post: 07-15-2010, 09:49 AM
  4. Automatically Lock Fields
    By Toolman in forum Database Design
    Replies: 2
    Last Post: 05-27-2010, 10:36 AM
  5. Can I lock out fields in a form by keying off...
    By swampdonkey in forum Access
    Replies: 2
    Last Post: 09-07-2006, 07:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums