Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    104

    Unanswered: Setting, Detecting, and Clearing File Locks

    Hi All,

    I have an Access Database, and it will be used in a networked environment. The Maximum number of users is 2 or 3, and only one of them will be assumed to be using it at any given instance of time. here is an important question:

    I need to find a way to only allow one user to open the database files at any given time. Is there a way to "lock" files, detect such locks, and clear them to implement such a feature? If so, How can I do it?

    thanx for any/all feedback beforehand!

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Under the Tools menu...select Options then select the Advanced tab. Set the Default Record Locking options to Edited Record. With this set, no one can work on the same record. They can on other records but not the one you are currently editing. If you want to Lock everything then set the option to All Records. When All Records option is selected then no records can be edited while the database is in use by a individual.

    If you want, you can bring up the Options window from a Command button by entering this line of code into the On Click event:

    DoCmd.RunCommand acCmdOptions


  3. #3
    Join Date
    Nov 2003
    Posts
    104

    I'll try

    Thanx. I'll give that a shot. wish me luck.

  4. #4
    Join Date
    Nov 2003
    Posts
    104
    The Record Locking business is now working. However, when i try your trick with the button, I get the following error. HELP?

    http://shassouneh.homestead.com/file...roNotfound.png

    thanx

  5. #5
    Join Date
    Nov 2003
    Posts
    1,487
    May only work from the serving unit.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •