Results 1 to 10 of 10
  1. #1
    ry94080 is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2019
    Posts
    36

    Open databases by using record-level locking via VBA

    Hello,



    Would anyone happen to know how to configure the highlighted item below with VBA?

    Click image for larger version. 

Name:	Lock.JPG 
Views:	15 
Size:	75.1 KB 
ID:	48013

    Thanks!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

  3. #3
    ry94080 is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2019
    Posts
    36
    Quote Originally Posted by orange View Post
    Did you try clicking the checkbox?
    Of course, but as i stated in the question, is if this is possible to edit that setting via VBA...

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    So have a look at the properties of the db, and see if that property is mentioned?
    However, it might turn out to be read only.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    This link suggests you can set lock parameter on Recordset. Lots of results re Recordset locking with vba. I did not find an parameter/property for Database, but only tried Google.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Here is a snippet of code to check your db properties. Access 2007 does not even have that option in the list.
    Code:
    Sub dbProperties()
    Dim prp As DAO.Property
    Dim db As DAO.Database
    On Error Resume Next
    
    
    Set db = CurrentDb()
    For Each prp In db.Properties
        Debug.Print prp.Name & " - " & prp.Value
    Next
    Set db = Nothing
    End Sub
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    Access 2007 does not even have that option in the list.
    a lot of properties are not created until actually used - tick the box and run the code again to see if it is returned. Untick it and it should still be there

  8. #8
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by Ajax View Post
    a lot of properties are not created until actually used - tick the box and run the code again to see if it is returned. Untick it and it should still be there
    No, I mean, I do not have the Client Settings option in my list of options.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    No, I mean, I do not have the Client Settings option in my list of options.
    Surprising

  10. #10
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Quote Originally Posted by Ajax View Post
    Surprising
    Well it is 2007
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 8
    Last Post: 05-17-2020, 03:51 AM
  2. Replies: 3
    Last Post: 04-18-2018, 09:02 PM
  3. record-level locking clarification
    By vientito in forum Access
    Replies: 3
    Last Post: 11-12-2014, 09:39 AM
  4. Replies: 3
    Last Post: 11-01-2013, 10:16 AM
  5. Replies: 3
    Last Post: 11-10-2011, 03:54 PM

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