Me.recordsetclone.findfirst

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?
 
F

Fluit

I tried so, but no succes.

I don't understand why the record can't been found, no changes are
made?
 
A

Alex Dybenko

Hi,
if you get this error message - the record is found. The problem that while
editing one record you trying to update it once again via code. You have to
save it first.

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

I tried so, but no succes.

I don't understand why the record can't been found, no changes are
made?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top