&nbsp;<BR>Hi there<BR><BR>I&#039;m using VBA with Access &#039;97 to develop a simple account updating interface, but seem to be encounter problems where multiple users can access the same account at the exact same time.<BR><BR>Basically all I&#039;m doing is using a Form to retrieve record information from an Accounts table, but if two people request a valid Account at exactly the same time, then they are both presented with the record details, even though as soon as one individual gets an Account, the Locked field in the Account table should be set to true (ie checkbox is ticked).<BR><BR>Is there any way I can prevent this from happening, I&#039;ve thought about trying to use a Pessimistic Lock, so as soon as the record is put into edit mode its Locked, but I&#039;m not really sure?<BR><BR>Here&#039;s the bare bones of my code, cheers in advance for any help!<BR><BR>Option Compare Database<BR>Option Explicit<BR>Dim RecFound As Boolean<BR>Dim rst As Recordset<BR>Dim db As Database<BR><BR>Private Sub cmdNext_Click()<BR><BR>Call Clear_All &#039;Clears all form fields<BR><BR>If Not RecFound Then &#039;If RecFound is False then call Find_Next<BR> Call Find_Next<BR> Exit Sub<BR>End Sub<BR><BR>Private Sub Find_Next()<BR><BR>Dim iLoopCount As Integer &#039;Loop Counter<BR>Dim sSearch As String &#039;SQL String<BR><BR>iLoopCount = 0 &#039;Initialise Counter<BR><BR>RetryLoop:<BR><BR>Set db = CurrentDb<BR><BR>&#039;SQL Criteria = Locked field & Updated field in Accounts table are False<BR><BR>sSearch = "SELECT TOP 1 * FROM tbl_Accounts "<BR>sSearch = sSearch & "WHERE tbl_Accounts.Locked = False AND"<BR>sSearch = sSearch & "tbl_Accounts.Updated = False"<BR><BR>Set rst = db.OpenRecordset(sSearch, dbOpenDynaset)<BR><BR>If rst.RecordCount &#060; 1 Then<BR> MsgBox "No more Accounts to work!", vbInformation, "Accounts"<BR> RecFound = False<BR> Exit Sub<BR>Else<BR> If rst!Locked = False Then &#039;If record field "Locked" is unchecked<BR> rst.Edit &#039;Put into edit mode<BR> rst!Locked = True &#039;Lock or Check the "Locked" field<BR> rst.Update &#039;Update the Accounts Table<BR> RecFound = True &#039;Set RecFound to True<BR> Call Pop_All &#039;Populate the Form fields with the Record information<BR>Else<BR> If iLoopCount &#060; 3 Then &#039;Try 3 times<BR> iLoopCount = iLoopCount + 1 &#039;Increment counter<BR> GoTo RetryLoop &#039;Loop<BR>Else<BR> MsgBox "Unable to retrieve record, please click &#039;Next Account&#039;", vbInformation, "Accounts"<BR> <BR> RecFound = False &#039;Set RecFound to False<BR> Exit Sub<BR> <BR>End If<BR>End If<BR>End If<BR><BR>Exit Sub<BR> <BR>End Sub<BR><BR>