DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2009
    Location
    Malaysia
    Posts
    49

    Question how to calculate the check digit (EAN-13) barcode symbologies ?

    Hi all friends,

    (1 textbox and 1 command button)

    pls help me write the code in VB6 into command button click event, when i click the command button the barcode and check digit will show on the textbox.


    EXAMPLE
    How to calculate the Check Digit
    A check digit is the result of a mathematical calculation performed on the preceding digits in the number. It is used during scanning to verify that the barcode was correctly read.

    This calculation, called the Modulo 10 algorithm, is the same for all GS1 primary identification numbers.

    An example calculating the check digit
    8 9 0 4 0 0 0 2 1 0 0 3 C (check digit position)

    Perform the following calculation using the GTIN - 13 numbers from the example above.

    1.Starting with the first number on the right, add all the alternate numbers
    2. 3 + 0 + 2 + 0 + 4 + 9 = 18

    3.Multiply the result by three.
    18 x 3 = 54

    4.Starting with the second number on the right, add all alternate numbers.
    0 + 1 + 0 + 0 + 0 + 8 = 9

    5.Add the results of steps two and three.
    54 + 9 = 63

    6.Add the number needed to bring the total to the next multiple of 10.
    63 + 7 = 70

    The number which you need to add to make it the next multiple of 10 is the check digit.

    In our example the check digit is 7.

    The complete number is: 890 4000 21003 7

    thank u.


  2. #2
    Join Date
    Jul 2009
    Location
    Malaysia
    Posts
    49

    Lightbulb Resolved!!

    thank all..

  3. #3
    Join Date
    Aug 2009
    Posts
    1
    Every number has a WEIGHT...
    890400021003?

    8 9 0 4 0 0 0 2 1 0 0 3
    8*1 + 9*3 + 0*1 + 4*3 + 0*1 + 0*3 + 0*1 + 2*3 + 1*1 + 0*3 + 0*1 + 3*3
    8 + 27 + 0 + 12 + 0 + 0 + 0 + 6 + 1 + 0 + 0 + 9 = 63
    We must add 7 to make 63 evenly divisible by 10 (63 + 7 = 70), therefore the check digit is 7.

  4. #4
    Join Date
    Mar 2012
    Posts
    1
    This EAN13 Barcode Control is able to automatically calculate the check digits.

  5. #5
    Join Date
    Jan 2013
    Posts
    4
    Try this SDK:Barcode Generator for .NET
    .NET Barcode Generation SDK is able to generate and create over 20 linear, postal & 2D barcodes, including QR Code, Data Matrix, PDF-417, Code 39, Code 128, EAN 13, GS1 128, Intelligent Mail, UPC-A, etc in accordance with the latest barcode specification in ISO or GS1 system.
    And the check digit will be calculated automatically.

  6. #6
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,652
    The question deals with Classic VB. A .NET solution isn't going to work for that platform.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Calculating a MOD 10 Check Digit
    By Scott in forum Database
    Replies: 1
    Last Post: 01-11-2003, 04:54 AM
  2. Calculating a MOD 10 Check Digit
    By Scott in forum Database
    Replies: 1
    Last Post: 01-07-2003, 02:12 PM
  3. Check box isssue when bound to a database column
    By Narayan in forum VB Classic
    Replies: 0
    Last Post: 04-10-2001, 10:30 AM
  4. BARCODE DATABASE.
    By ROB in forum VB Classic
    Replies: 5
    Last Post: 02-26-2001, 11:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links