Microsoft Access 2003 VBA coding to change a form's Record Locks property to Edited Record instead of No Locks.

I need a VBA function that will allow me to enter the name of the form and change the form's Record Locks property to Edited Record instead of No Locks.

Thanks in advance.

Stephen
LVL 1
stephenlecomptejrAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
Sub changeP(sform As String)
Dim prp As Property
On Error Resume Next
DoCmd.OpenForm sform, acDesign, , , , acHidden
    For Each prp In Forms(sform).Properties
        If prp.Name = "RecordLocks" Then
        prp.Value = 2
        End If
    Next
DoCmd.Close acForm, sform, acSaveYes
End Sub
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.