Runtime error 3167 - record is deleted

JamesN

Registered User.
Local time
Today, 05:22
Joined
Jul 8, 2016
Messages
78
Hi,

I have a split multi user database with a user form being used to input date into 3 tables.

On occasions an error will occur when submitted a new record which is run time error 3167 - record is deleted. What is the cause of this? And is there any way to catch it in the code?

Thanks
 
Code:
Private Sub Command0_Click()
On Error Resume Next

    With CurrentDb.OpenRecordset("select * from table1")
    
        CurrentDb.Execute "delete * from table1"
        
        Do Until .EOF
            Debug.Print .Fields(1) '<== Error 3167, record is deleted
            If Err.Number <> 0 Then Exit Do
            .MoveNext
        Loop
    End With
    
    Select Case Err.Number
        Case 0
        Case 3167: MsgBox "The record has been deleted by another user or process", vbExclamation, CurrentProject.Name
        Case Else: MsgBox Err.Description
    End Select

End Sub
 
I have a split multi user database with a user form being used to input date into 3 tables.

Does each user have a copy of the front end on their hard drive?

Is this Form Bound or Unbound?

If Unbound, how, exactly, are you saving the data to these three Tables?

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom