Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock Records

Status
Not open for further replies.

xeb

Technical User
Nov 14, 2003
81
US
Is there a way to lock a record after it's been accessed once so it can't be again?
 
Hi
The only way I can think of is through a form and a 'lock' field - not a true lock:
Code:
Private Sub Form_AfterUpdate()
    Me!LockedForAccess = True 'Logical Field
End Sub

Private Sub Form_Current()
    If Me!LockedForAccess Then 'Logical Field
        Me.AllowEdits = False
        MsgBox "This record cannot be edited."
    Else
        Me.AllowEdits = True
    End If
End Sub

Might be of some use. [ponder]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top