Whether you are using Barcodes, RFID, or entering text using a keyboard. Sometimes you just need an app that can get data into Excel.

Fastest way to do that is either direct entry in Excel (UGH!) or using Comma-Delimited-Format flat files as feed stock for Excel to much on. (Or pretty much ANY Data management app for that matter.)

.CSV files are basic, and the VB.NET BASIC programming is one of the more alternative ways to generate files like these.

In this case a 7 data item record capture program that does the following:

1) Capture 7 data elements.

2) Makes sure we entered something on each line.  (only basic <READ::desperate> checking, you can add Zero-Sum value checks and other LostFocus() items as you see fit.)

3) Saves all 7 data elements as a single row of data.

4) Resets fields and allows the user to continue.

5) Saves a file that can be used in Excel.  {Notice I did not indicate an EXCEL-Format file...  :->)  }

Caveat to this operation is the following two Barcode Scan translations (Found in [Translations] tab for scanners) cases in a specific order.

Search for the phase '{ENTER}'  (*) on a barcode and translate it [replace] with unicode '\000D' for an "Enter" button press. This allows a user to scan to press enter, and prevents a mode change to type on the keyboard.

This is used for Case 1.

For each "Barcode" scanned, Add the suffix of unicode '\0009'  or "Tab" button press. This allows for the barcode scan to step to the next text entry box in the form.  (VB.BET and VB6 UI Programmers Friend -- TabIndex!!!)

This is used for Case 2.   -- That way if someone scans {ENTER} barcode, it is not suffixed with a "Tab" which skips a text entry box.

So HERE is the demo that does that.   I use Hardcoded files (Others can make the nice file dialogs work...) and only does data validation in the cases of "Was anything entered?" There are better ways to do this, but a stream-of-conciousness app tends to use bad code. This is the code to make any developer WINCE, but one needs to see a bad example to make sure they don't do this themselves. Or at least refactor the code to take away the badly done bits...

A lot of code to cut and paste in 2-3 Hours time to cook this "craptactular" piece of code, but when you need to pull a Rabbit out of the hat -- Claws and all:  Here you go!   -sean

(*) with single quotes removed of course, this just makes the items readbale in this Blog Post.

P.S. As I indicate this is a Crappy Program. But most utilities tend to be just that in the first prototype stage. This is a demo after all, and I have seen MUCH worse than this.  And I just recall I forgot something.  {ENTER} barcode. image. (Right-Click Save-As...)  -smk8