Using barcode scanner with Access 
Author Message
 Using barcode scanner with Access

Hi,

I want to set up a barcode database. The fields that I need in it are :

Barcode
Article
Date of purchase
Invoice number
Price
Warranty
Supplier name

I have a barcode scanner connected via the keyboard connector. The
scanner sends the barcode to the computer with an ENTER or TAB at the
end of the barcode.

Say I want to add 10 2,1gb harddisks to the database. I want to enter
the default values for the fields listed above, and then when I scan the
10 harddisks, Access has to automatically add them using the default
values and the barcodes of the harddisks.

I know I will have to use VBA to do this, but I don't know where to
start. Can somebody give me some hints, and maybe some example code ?
I'm using Access '97.

Thanks alot !

Jasper




Fri, 07 Jul 2000 03:00:00 GMT  
 Using barcode scanner with Access

I would use unbound fields (maybe in the form header?) to enter the default
information, use the AfterUpdate event  on the bardcode field to add the
contents of the unbound fields to a new record. The {ENTER} or{TAB} at the
end of the barcode will initiate the AfterUpdate event, so you can
continually scan similiar items without using the keyboard. Something like
this will work:

Dim recCurr as recordset

public sub myform_AterUpdate()
    Set recCurr = me.RecordSetClone()
    with recCurr
        .AddNew
        !Barcode = me!ubndBarcode
        !Article    = me!ubndArticle
        !DateOfPurchase = me!ubndDateofPurchase
        !InvoiceNumber = me!ubndInvoiceNumber
        !Price = me!ubndPrice
        !Warranty = me!ubndWarranty
        !SupplierName = me!ubndSupplierName
        .Update
        .Close
    End With
EndSub

Hope it helps (this was off the top of my head, so check syntax etc.)

Buddy Oliver
Systems Analyst
FiberPlex Inc.
You know what to do if you use my Email Address.... ;)

Quote:

>Hi,

>I want to set up a barcode database. The fields that I need in it are :

>Barcode
>Article
>Date of purchase
>Invoice number
>Price
>Warranty
>Supplier name

>I have a barcode scanner connected via the keyboard connector. The
>scanner sends the barcode to the computer with an ENTER or TAB at the
>end of the barcode.

>Say I want to add 10 2,1gb harddisks to the database. I want to enter
>the default values for the fields listed above, and then when I scan the
>10 harddisks, Access has to automatically add them using the default
>values and the barcodes of the harddisks.

>I know I will have to use VBA to do this, but I don't know where to
>start. Can somebody give me some hints, and maybe some example code ?
>I'm using Access '97.

>Thanks alot !

>Jasper





Sat, 08 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Newbie Q: Using a barcode scanner with VB

2. barcode scanner in USB port

3. How to read Barcode Scanner??

4. vb.net and barcode scanners

5. Barcode Scanner and VB .NET

6. RF Barcode Scanner /w Visual Studio?

7. ASP with barcode scanner

8. Barcode scanners

9. Norand Barcode scanners???

10. Barcodes-Scanners cabled to the ethernet

11. USB Barcode Scanners

12. barcode scanner

 

 
Powered by phpBB® Forum Software