PC Review


Reply
Thread Tools Rate Thread

Me.recordsetclone.findfirst

 
 
Fluit
Guest
Posts: n/a
 
      9th Jul 2008
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?
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      9th Jul 2008
Hi,
Try to save record before running this code:
me.dirty=false

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

"Fluit" <(E-Mail Removed)> wrote in message
news:918db09d-3aad-4898-9ba9-(E-Mail Removed)...
> 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?


 
Reply With Quote
 
Fluit
Guest
Posts: n/a
 
      14th Jul 2008
I tried so, but no succes.

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

On 9 jul, 17:57, "Alex Dybenko" <alex...@PLEASE.cemi.NO.rssi.SPAM.ru>
wrote:
> Hi,
> Try to save record before running this code:
> me.dirty=false
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)http://accessblog.nethttp://www.PointLtd.com
>
> "Fluit" <PDr...@gmail.com> wrote in message
>
> news:918db09d-3aad-4898-9ba9-(E-Mail Removed)...
>
> > 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?


 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      14th Jul 2008
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

"Fluit" <(E-Mail Removed)> wrote in message
news:0d5ef637-ff92-4a64-ab97-(E-Mail Removed)...
I tried so, but no succes.

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

On 9 jul, 17:57, "Alex Dybenko" <alex...@PLEASE.cemi.NO.rssi.SPAM.ru>
wrote:
> Hi,
> Try to save record before running this code:
> me.dirty=false
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)http://accessblog.nethttp://www.PointLtd.com
>
> "Fluit" <PDr...@gmail.com> wrote in message
>
> news:918db09d-3aad-4898-9ba9-(E-Mail Removed)...
>
> > 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?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 3070, Bookmark, RecordsetClone.FindFirst JK Microsoft Access VBA Modules 0 1st Apr 2008 04:49 PM
Help wth RecordsetClone.FindFirst Dave Microsoft Access Form Coding 4 6th Mar 2007 05:49 PM
Recordsetclone findfirst error. I am stumped!! =?Utf-8?B?c3RvcmsyOQ==?= Microsoft Access VBA Modules 18 9th Nov 2003 12:10 AM
RecordsetClone.FindFirst causes error Peter Row Microsoft Access Forms 5 9th Oct 2003 12:08 PM
Recordsetclone.Findfirst on a form over a network is slow!!!! Charles Coltun Microsoft Access Forms 0 26th Jul 2003 07:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:47 PM.