Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Setting record-locking problem. (Access 2000)

    My problem is that No Locks is set for others opening my database when I have set Record-Level locking. This is resulting in record corruption.

    I expected to solve my database options setting for record locking in the same way that I fixed the Windows in Taskbar setting. I did not realise that when someone else opened my database the Windows in Taskbar setting changed to true whilst my setting remained at false. I resolved this by adding a line of code to the Splash screen as follows:
    Application.SetOption "ShowWindowsInTaskbar", False

    I have checked Help for SetOptions and there is a Use Record Level Locking option but I can not work out the syntax to get it to work.

    I want the options to be Default record locking = Edited record and Open databases using record-level locking = True

    Can anyone help me?

    RiCH

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Setting record-locking problem. (Access 2000)

    Default record locking only determines the default setting for new forms etc., it won't affect existing ones.

    You can set the Record Locks property for each query, form and report individually. This will be stored in the database.

    Note: 'show windows in taskbar' is a user preference; in my opinion, you shouldn't force your preference upon the user.

  3. #3
    New Lounger
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Setting record-locking problem. (Access 2000)

    Many thanks Hans

    I will read up on setting the Record Locks property for each query, form and report individually.

    Re: 'show windows in taskbar' If I create buttons to open forms without closing previous forms e.g. Main Menu. List Records, View Record and Edit Record. I do not want users to click into the main menu on the task bar from Record Edit and close the database with incomplete changes. I tend to close forms as I open new ones now anyway rather than hiding them.

    Thanks again RiCH

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Setting record-locking problem. (Access 2000)

    You can also open a form modally, i.e. the user has to close it before being able to activate another one. There are two ways to accomplish this:
    1) Set the Modal property of the form to True (in the Other tab of the Properties window)
    2) If you open the form using DoCmd.OpenForm, specify acDialog as WindowMode argument:

    DoCmd.OpenForm FormName:="frmMyForm", WindowMode:=acDialog

Posting Permissions

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