Solved

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

Posted on 2008-06-19
1
397 Views
Last Modified: 2013-11-27
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
0
Comment
Question by:stephenlecomptejr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 21823955
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

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question