Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trapping Barcode ASCII information into a field within a table 3

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB
Hi All

Found this in the forum: thread184-889832

I have looked at several different websites with barcode readers (example and not an advertisement:
My questions are:

1. When you scan a barcode which I understand is "trapped" by the keyboard, how do I transfer that data (In this case a UPC or SKU 13 digit string) straight into a text box on a form?

2. Do you need to use the software that comes with the scanner in conjunction with VFP6 / VFP 9?

I'm new to this so any information would be appreciated.

Many thanks

Lee

Windows XP
Visual FoxPro Version 6 & 9
 

I have used barcode scanners a few times, in all cases the information needed to enter in a textbox. You can set to scanner to send an "Enter" key after the sequence to trigger a valid event in the textbox (ie. Scanning a product code from a product for an invoice entry in a POS system). But definately you need to scan the barcode to send it somewhere. Depending on the type of scanner you use you may have to strip the delimiter characters from the beginning and the end of the string you recieve (Usually a "*")


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
I have been working with barcodes and barcode scanning systems for a number of years now. Some with FP/VFP applications and some without.

The answer to your questions is "It Depends..."

How do you want to use the barcode data?
* Directly into a specific VFP Form's Textbox?
* Directly into a data table un-attended?

Also, to address Mike's issue above " Depending on the type of scanner you use..."

What type of scanner are you going to use?
* Manually/Automatically triggered hand-held device?
** Keyboard "wedge" interfaced reader?
** Direct port (e.g. USB port) interface?
* Conveyor belt type which automatically reads codes?

NOTE - from model to model individual manufacturer's products may work in different manners - requiring you to be careful in what you select.

The answer to those questions will tell us more about what you intend to do and how it will be accomplished.

Then we can answer your questions in greater detail.

Good Luck,
JRB-Bldr
 

Mike / JRB-Bldr

Mike

Thank you for your replies.

Depending on the type of scanner you use you may have to strip the delimiter characters from the beginning and the end of the string you receive (Usually a "*")
That shouldn't be a problem as you made me aware of:
Code:
var1=FIELDNAME
replace FIELDNAME with strtran(VAR1,"*","")

The project we are looking at is an established APP but the client is looking to speed up the process of "Booking in" items that have been received. In other words.... order is placed, UPC/SKU number is the reference (we have considered there could be more than one order with the same UPC/SKU but that's taken care of), item is received in to stock, barcode is scanned (instead of having to look up the customer order), item is found and the order is updated.

Thank you Mike

JRB-Bldr

The answer to your questions is "It Depends..."

How do you want to use the barcode data?
* Directly into a specific VFP Form's Textbox?
* Directly into a data table un-attended?

In answer to the first question, we want to keep it simple by populating a field on a form or doing an automatic search within a table to see if the scanned UPC/SKU number is present for a current order (I'm sure we can take of the source code, it's just a matter of getting that read information into some sort of field or perhaps storing it to a variable)

The second question, directly into a data table.... well again, a lot will depend on how the intial string (UPC/SKU number) is received. I'm sure we could do this "un-attended" but how is the scanned barcode recognised and turned into a variable for searching within a table?

As far as
What type of scanner are you going to use?
This would have to be a Manually triggered hand-held device, similar to the example I have posted. The reason for this is because the client is receiving in some cases, over 500 CD's/DVD's per day and the procedure at the moment is to manually search each one to find the customer who has ordered it.

In respect of
** Keyboard "wedge" interfaced reader?
** Direct port (e.g. USB port) interface?
* Conveyor belt type which automatically reads codes?
Well I'm not sure about this yet, until I've done some more research or perhaps you guys suggest the best approach.

I hope the above gives a better insight into what I am trying to achieve

Many thanks

Lee

Windows XP
Visual FoxPro Version 6 & 9
 
If you are going to read the barcode data into a Form's Textbox, the keyboard wedge interface might be the most simple to use since there are NO interface issues to have to deal with. The data comes in EXACTLY as though the user had typed it in.

However, based on what you say...
"Manually triggered hand-held device. The reason for this is because the client is receiving in some cases, over 500 CD's/DVD's per day"

You are suggesting that one or more people will be manually triggering a barcode reader 500+ times per day?

I might make some suggestions as to alternate ways of receiving the goods and relating it to the associated customers.

Good Luck,

JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 

Hi jrbbldr

Thank you for clearing that up. My problem was not being able to establish how the barcode string got into the field in a table on a form, but it makes sense now. From research it looks as though you need a "wedge" so the barcode reader/scanner links in with keyboard.

Thanks again to you (and Mike)

Lee

Windows XP
Visual FoxPro Version 6 & 9
 
Wedge or USB usally does not matter they almost ALL read/send data like a keyboard. Most are configurable for the code sent at scan compleation i.e. chr(13) or [TAB] the only thing I learned the hard way was to code to the "default" code. The first one I wrote I changed the default from a [TAB] to send [ENTER] all was well until scanners needed reset and for the model choosen, a cordless this happened offten and it meant re-programming the scanner everytime it was reset. Had I known this I would have coded to work on the [TAB] default. Just my 2 cents. I must admit on my first scanner app I made much more of it then was needed. it was a piece of cake.

Steve Bowman
Independent Technology, Inc.
CA, USA
 
was not thinking and used "[TAB]" in previous post and this was read by the TGML process are replaced with a real tab sorry, the previous post should read TAB at the spaces

Steve Bowman
Independent Technology, Inc.
CA, USA
 

Thank you for your post Steve

I have ordered a barcode handheld scanner (Just a cheaper one for now) to test it out and I await it's arrival.

You mentioned about chr(13). Can I assume you mean that when the barcode is scanned, the digits are entered into the text box on a form (that will be our scenario) and the chr(13) acts as an enter/return key press?

Lee

Windows XP
Visual FoxPro Version 6 & 9
 
yes per the configuration of the scanner it will process a code post-scan. from "my" experiance the default is usally TAB but all the ones I used could be changed to any other keyboard item like ENTER some even allowd to configure an ASCII code i.e. chr(13). So for most of my applications I have either used the valid event of a control and left the code default at TAB and processed on lost focus of the control OR used on key label TAB or what ever the post-scan code was. I have worked with some NON configurable scanners so to get the end-scan code I just opened up notepad and scanned a barcode then just looked at the last bit of the file like asc(right(alltrim(filetostr("myscanfile.txt)),1))

Steve Bowman
Independent Technology, Inc.
CA, USA
 

Steve

Very helpful information, many thanks.

Lee


Windows XP
Visual FoxPro Version 6 & 9
 
Not directly related to VFP, but I bought a WASP pen like barcode reader (cheapest thing I could find) for selling CD's on ebay, and this out of the box, read the barcode into the required field into the ebay form and issued an <enter> without any input from me at all (configuration or otherwise).

I didn't need any software (I'm on XP), and it was a PS/2 version not USB, so had the relevant connectors to attach the keyboard in between.

Works fine, so it would work in the same manner in VFP.

Neil

I like work. It fascinates me. I can sit and look at it for hours...
 
just knocked up a quick form and tested it with a valid event. Works as expected!

I like work. It fascinates me. I can sit and look at it for hours...
 

FatSlug

First chance I've has today to unpack and test the scanner as suggested by the guys on this thread.

Well I have to say, it was easier than I thought!

The handheld scanner came with all the leads (cost about £40 uk pounds inclusive) and it was a simple case of plugging one end into the keyboard socket, the keyboard into the lead and the scanner into the supplied lead.

Like yourself, I had a form onscreen, picked up a CD and scanned the barcode and it worked perfectly. In fact, the text field was populated with UPC number and did not require the use of an enter/return key.

Thanks again all, problem solved

Lee


Windows XP
Visual FoxPro Version 6 & 9
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top