Search record is finding another record when using findfirst

  • Thread starter Thread starter laks
  • Start date Start date
L

laks

Hi,

We have an application in MS Access, i am searching for a record using
below code

if Me.Dirty then Me.Dirty = false

With Me.RecordsetClone

.FindFirst "[DrawingNumber] = """ & Me.DrawingNumberSearch & """"

If .NoMatch Then
MsgBox ("Drawing Number" & Me.DrawingNumberSearch & "is not
available")
Me.DrawingNumberSearch.Value = ""
Else
Me.Bookmark = .Bookmark
Me.DrawingNumberSearch.Value = ""
End If

End With


we have huge data in the database
(around 100000) when i search for 50000 record, it is displaying the
correct data, but when i update it is updating the different record
which shows in navigation bar (Previous, first, next, last).

Anybody can help in this??.This application is in live.

Thanks in advance.
 
Do not trust the navigation bar number to be the same everytime for a given
record.

If the table is indexed and you updated a field in the index it can display
the records in a different sequence.
 
Hi,

It is updating the record which it was showing in the Navigation bar.
I have on the SQL profiler and checked.

Thanks and Regards



KARL said:
Do not trust the navigation bar number to be the same everytime for a given
record.

If the table is indexed and you updated a field in the index it can display
the records in a different sequence.

laks said:
Hi,

We have an application in MS Access, i am searching for a record using
below code

if Me.Dirty then Me.Dirty = false

With Me.RecordsetClone

.FindFirst "[DrawingNumber] = """ & Me.DrawingNumberSearch & """"

If .NoMatch Then
MsgBox ("Drawing Number" & Me.DrawingNumberSearch & "is not
available")
Me.DrawingNumberSearch.Value = ""
Else
Me.Bookmark = .Bookmark
Me.DrawingNumberSearch.Value = ""
End If

End With


we have huge data in the database
(around 100000) when i search for 50000 record, it is displaying the
correct data, but when i update it is updating the different record
which shows in navigation bar (Previous, first, next, last).

Anybody can help in this??.This application is in live.

Thanks in advance.
 
Hi,

when i tried to update it is updating the wrong record (which it was
showing in the navigation bar)
I have opened the SQL profiler and seen that.

Thanks and Regards
 
The way you are using navigation bar is unknown to me. Is it something other
than a standard Access object?
 

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

Back
Top