F
Fluit
After updating a the textbox I want to seach a value of fldOpmerkingeN
in the recordset. Therefore I use the following code:
Private Sub txtOpmNotulen_AfterUpdate()
Const strToevoegsel As String = "_(F)"
Dim strLinkCriteria As String
If Taalkeuze = "N" Then
strLinkCriteria = "fldOpmerkingenN like " & """" &
Me.txtOpmNotulen & """" & " AND Not (fldOpmerkingenF like " & """" &
"*" & strToevoegsel & """" & ")"
With Me.RecordsetClone
.FindFirst strLinkCriteria
If .NoMatch Then
Exit Sub
Else
If Not ((!fldOpmerkingF = Me.fldOpmerkingenF) And ((!
fldOpmerkingF Like "") Or IsNull(!fldOpmerkingF))) Then
Me.fldOpmerkingenF = !fldOpmerkingenF
Else
Me.fldOpmerkingenF = !fldOpmerkingenN & strToevoegsel
End If
End If
End With
Else
End If
End Sub
At .FindFirst a message appears
"The Microsoft Jet database engine stopped the process because you and
another user are tempting to change the same data at the same time."
I thought that using recordsetclone these problems are avoided?
Someone a solution?
in the recordset. Therefore I use the following code:
Private Sub txtOpmNotulen_AfterUpdate()
Const strToevoegsel As String = "_(F)"
Dim strLinkCriteria As String
If Taalkeuze = "N" Then
strLinkCriteria = "fldOpmerkingenN like " & """" &
Me.txtOpmNotulen & """" & " AND Not (fldOpmerkingenF like " & """" &
"*" & strToevoegsel & """" & ")"
With Me.RecordsetClone
.FindFirst strLinkCriteria
If .NoMatch Then
Exit Sub
Else
If Not ((!fldOpmerkingF = Me.fldOpmerkingenF) And ((!
fldOpmerkingF Like "") Or IsNull(!fldOpmerkingF))) Then
Me.fldOpmerkingenF = !fldOpmerkingenF
Else
Me.fldOpmerkingenF = !fldOpmerkingenN & strToevoegsel
End If
End If
End With
Else
End If
End Sub
At .FindFirst a message appears
"The Microsoft Jet database engine stopped the process because you and
another user are tempting to change the same data at the same time."
I thought that using recordsetclone these problems are avoided?
Someone a solution?