Bookmark problem

ybg1

Registered User.
Local time
Yesterday, 20:58
Joined
Jan 3, 2009
Messages
20
I'm using the following to bring a person details using a Barcode .
It works fine.
But if I'm using the same barcode again on the already found person,
for some reason it brings me a person that is not related to this barcode.
In the third attempt it will bring me the right person... and so on.


Private Sub Barcode_AfterUpdate()
Dim rst As DAO.Recordset
Dim strCriteria As String
strCriteria = "[Bar_Code] = " & Me.Barcode
Set rst = Me.RecordsetClone
rst.FindFirst strCriteria
If rst.NoMatch Then
MsgBox "No entry found.", vbInformation
Else
Me.Bookmark = rst.Bookmark
End If
Set rst = Nothing
End Sub

am I missing something?
progress.gif
 
I use this Bookmark technique in one spot of an application. The code you posted seems correct to me.

What datatype is the column / Me.Barcode? If string, then perhaps you are missing putting quotes in the search criteria.
 

Users who are viewing this thread

Back
Top Bottom