I have a multiuser split db with this code on a listbox:
The error function sends me an e-mail listing the error, user, form and sub. Ocasionally some users get error 3049 when running this sub. It is generally one user out of about 10 or so and the db keeps working fine for everyone else. I have reviewed the back end several times and I cannot find any obvious corruption signs. I have compacted and repaired it several times with very small changes is size.
Can anyone see anything obvious in the code that could be causing this issue?
mafhobb
Code:
Private Sub lstsearch_DblClick(Cancel As Integer)
' The following is the variable definition for the error handler
On Error GoTo lstsearch_DblClick_Error
Dim ErrorForm As String
Dim ErrorControl As String
Dim ErrorCode As String
Dim ErrorNumber As String
ErrorForm = "SearchCustomer"
ErrorControl = "lstSearchDblClick"
If IsNull(Me.lstsearch) Or Me.lstsearch.Value = "" Then
MsgBox "Keinen Datensatz ausgewählt"
Exit Sub
End If
Dim stDocName As String
Dim stLinkCriteria As String
' Procedure
stDocName = "Contacts"
stLinkCriteria = "[ContactID]=" & Me![lstsearch]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit Sub
' Error handler
lstsearch_DblClick_Error:
ErrorNumber = Err.Number
ErrorCode = Err.Description
Call SendError(ErrorCode, ErrorNumber, ErrorControl, ErrorForm)
Exit Sub
End Sub
The error function sends me an e-mail listing the error, user, form and sub. Ocasionally some users get error 3049 when running this sub. It is generally one user out of about 10 or so and the db keeps working fine for everyone else. I have reviewed the back end several times and I cannot find any obvious corruption signs. I have compacted and repaired it several times with very small changes is size.
Can anyone see anything obvious in the code that could be causing this issue?
mafhobb