AllExperts > Using MS Access 
Search      
Using MS Access
Volunteer
Answers to thousands of questions
 Home · More Using MS Access Questions · Answer Library  · Encyclopedia ·
More Using MS Access Answers
Question Library

Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scottgem
Expertise
I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience
I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

 
   

You are here:  Experts > Computing/Technology > Business Software > Using MS Access > Ignoring Barcode Scanner Input

Using MS Access - Ignoring Barcode Scanner Input


Expert: Scottgem - 7/2/2009

Question
I have an MS Access application where the user is scanning barcodes and a corresponding record in a table is date stamped. This all works fine but I want to include some error trapping. Two sorts - the first when a the barcode is not found in the table and  the second if the barcode has already been scanned. These both work fine and bring up suitable message boxes. But here is the problem -: If the operator doesn't notice the message box and makes another scan the CR at the end of the scanner input closes the message box. A only keyboard Enter or Mouse click on the OK button should close the message box. The Scanner will always send a long (over 10 chrs) string of ascii ending with a CR. Can I trap the difference? any help would be appreciated

Answer
This may be possible but it depends on how the scanner input is processed. Does the user just hit the button on the scanner? Or do they press something on the Access form to read from the scanner? In either case, I would need to see what VBA code is kicked off to read the value in the scanner and place it on the Access form. I'm suspecting that the SendKeys command is being used since the CR is being accepted as a keystroke.

Hope this helps,
Scott<>
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.