Record Locks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wayneyh
    New Member
    • Mar 2008
    • 67

    Record Locks

    Hello again

    My Next issue is when I open a form I want all the records to be locked or read only. If any records need to be edited the user will click a button to unlock all the records.

    Can you help

    Regards

    Wayne
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Make records Read-Only
    Code:
    Private Sub Form_Load()
     Me.AllowEdits = False
    End Sub

    Create a button to unlock record

    Code:
    Private Sub CmdEditRecord_Click()
     Me.AllowEdits = True
    End Sub
    Re-lock records when moving to a different record
    Code:
    Private Sub Form_Current()
     Me.AllowEdits = False
    End Sub
    Linq ;0)>

    Comment

    • Wayneyh
      New Member
      • Mar 2008
      • 67

      #3
      Hi Missinglinq

      I tried it that way but i can still edit the records.

      Ant ideas?

      Comment

      • Wayneyh
        New Member
        • Mar 2008
        • 67

        #4
        Hi Missinglinq

        My mistake. It does work but it doesn't work for the very first record.

        Is there a way to stop this?

        Wayne

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32653

          #5
          Originally posted by Wayneyh
          My mistake. It does work but it doesn't work for the very first record.

          Is there a way to stop this?
          Design the form in the first place with AllowEdits set to False.

          Comment

          Working...