Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 15th, 2011, 03:05 PM
Authorized User
 
Join Date: Jul 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Bookmark problem

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?
 
Old November 15th, 2011, 06:27 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

I would test to see if the scanned bar code already matches the bar code for the current record before doing the find.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old November 16th, 2011, 03:39 AM
Authorized User
 
Join Date: Jul 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes it does.
I gave up on it and I'm using Filter instead.
Thanks
 
Old November 16th, 2011, 04:12 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Glad to hear you found a solution!

Good luck with your project.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
Automate bookmark creation hogg Word VBA 1 November 12th, 2008 04:35 AM
Help with bookmark code on IE7 bvis Java Basics 0 December 16th, 2006 10:15 AM
Me.Bookmark = Me.RecordsetClone.Bookmark rkellogg Access VBA 5 September 8th, 2006 06:28 AM
Bookmark Style Terry Joseph Migliorino CSS Cascading Style Sheets 2 February 10th, 2006 07:52 AM
iframe bookmark problem reberman Javascript How-To 0 December 20th, 2005 12:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.