Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
443 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
1 Comment
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

824 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