mobile databases, mobile forms, and mobile synchronization … where you need to work
Providing Pocket Access, Mobile Database, Windows CE Database, and Windows CE Development Solutions

Tip of the Month (April 2003)

Using a Barcode Scanner to Find a Record

If you have a barcode reader connected to your handheld, you can use it to locate a record in a table. Just scan the barcode and then go to that record.

Here's how to do it:

  1. Ceate a table called Select. The Select table will have one record for each possible barcode. For example, if you had 1,000 items in your warehouse, the Select table would have 1,000 records. One of the columns in the Select table is a text column called PartNumber. The PartNumber column contains the barcode value. The PartNumber column is indexed.

  2. Build a form over the Select table to display the part information.

  3. Add two controls to the form. The first is an edit control connected to a variable. This is the control you will scan the barcode into. The second is a Command Button, RECORD | SEARCH, whos Arg is the variable the edit control is connected to. Turn on the "Exact matches only" checkbox.

  4. Select FORM | SORT ON, uncheck the "Not sorted" checkbox, and select PartNumber as the column to sort on.

  5. Download the form to the handheld and run it on the handheld. Scan into the to edit control connected to the variable and press the button. This will position you to the appropriate record.

    NOTE: If you happen to have a Symbol or Socket scanner, you don't even have to push the button. Just scan and the button will be pressed for you.