Hi all im havin some trouble setting my record locking getting it excalty how i want it, first of all my database is split with the backend on a local server and front end on users pc, and the record locking options is set up as edited record and with the built in access security setup
my first question is how can i show which user has a record open/locked? i found a function on here which tells me weather the record is locked or not like this below. although this just tells me that the record is locked if it is being editeded
is there some way i can set some thing up so as soon as a record is opened it is locked? and when someone attemptes to open that record it tells them the recod is locked and which user it is locked by? (although still allow them to view the record)
Function RecordLocked(rst As Recordset) As Boolean
Dim blnLock As Boolean
On Error GoTo ErrorHandler
' Save current value of LockEdits property.
blnLock = rst.LockEdits
' Set pessimistic locking.
rst.LockEdits = True
' Try to edit the record. This generates error 3197 if the
' record is locked.
RecordLocked = False
' Restore original value of LockEdits property.
rst.LockEdits = blnLock
Select Case Err
RecordLocked = True