On Feb 12, 12:02 pm, "giannis" <zzzinob...@freemail.grwrote:
Quote:
At the below code i search for a value of a field of a BindingSource
and when not found i search for the 40 earlier values inside a Loop.
>
At the Access VB i used the same Loop with the command "DoCmd.FindRecord"
and the rapidity was very much big.
>
Now at the VB this Loop be late very much (it is very slow). :(
Why this happens and how can i resolve this problem ?
Is there any other way to make this loop more fast ?
>
Dim found As Integer = My.Forms.skitso.SKITSABind.Find("skitsa", w)
>
If found -1 Then
>
My.Forms.skitso.SKITSABind.Position() = found
>
Else
>
p = Val(w)
>
Do
>
found = My.Forms.skitso.SKITSABind.Find("skitsa", Trim(Str(p)))
>
If found < 0 Then p = p - 1
>
If found -1 Or Val(w) - p 40 Or p < 15 Then Exit Do
>
Loop
>
If found -1 Then
>
My.Forms.skitso.SKITSABind.Position() = found
>
End If
>
Ånd If
What exactly is this supposed to accomplish?
Thanks,
Seth Rowe