Does anyone have a module they use for generating GS1-128 data?
I believe it's a 20 digit string based off our GLN + SerialNumber + Check Digit
I would've like to think Google would turn up something, but failing.
Thanks!
Does anyone have a module they use for generating GS1-128 data?
I believe it's a 20 digit string based off our GLN + SerialNumber + Check Digit
I would've like to think Google would turn up something, but failing.
Thanks!
From GOOGLE: https://www.google.com/search?client...-d&q=sscc+code
The Serial Shipping Container Code (SSCC) is an 18-digit number used to identify logistics units. In order to automate the reading process, the SSCC is often encoded in a barcode, generally GS1-128, and can also be encoded in an RFID tag. It is used in electronic commerce transactions.
Hope it's helpful.
Yes, I know what it is. I just need a way to calculate the check digit in an MS Access query. I'm sure there's a function floating around somewhere. Just having trouble finding it.From GOOGLE: https://www.google.com/search?client...-d&q=sscc+code
The Serial Shipping Container Code (SSCC) is an 18-digit number used to identify logistics units. In order to automate the reading process, the SSCC is often encoded in a barcode, generally GS1-128, and can also be encoded in an RFID tag. It is used in electronic commerce transactions.
Hope it's helpful.
Thanks!
so it's just the check digit calculation you need? https://www.excelforum.com/excel-for...n-formula.html
plenty of hits on google, here's another one https://www.excelcommand.com/excel-h...o.php?i=391709
sure you can use that to write your own function
ms access vba solution, complete with db sample, posted here
http://www.vbaexpress.com/forum/show...it-Calculation
I'm not a member so I can't validate.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
I did a mock up based on some links I found and the morovia link by ajax in post 8.
I have no experience with SSCC codes.
You can modify and confirm the logic with examples you are working with.
Code:---------------------------------------------------------------- ' Procedure Name: ssccChk ' Purpose: Sample procedure to validate sscc-18 via check digit ' Procedure Kind: Function ' Procedure Access: Public ' Parameter sampleCode (String): The 18 digit SSCC code to be checked ' Return Type: Integer ' Author: Jack ' Date: 16-Oct-21 ' ---------------------------------------------------------------- Function ssccChk(sampleCode As String) As Integer Dim totalSum As Integer Dim evenPosSum As Integer 'sum even position values Dim oddPosSum As Integer 'sum odd position values * 3 Dim i As Integer 10 For i = 1 To Len(sampleCode) - 1 'don't include the check digit in the summation 20 If i Mod 2 = 0 Then evenPosSum = evenPosSum + CInt(Mid(sampleCode, i, 1)) 30 If i Mod 2 = 1 Then oddPosSum = oddPosSum + CInt(Mid(sampleCode, i, 1)) * 3 40 Next i Calcs: 'The check digit is the number which adds the remainder to 10 50 totalSum = evenPosSum + (oddPosSum) 60 Debug.Print "check digit is " & 10 - totalSum Mod 10 'for testing 70 ssccChk = 10 - totalSum Mod 10 80 If Right(sampleCode, 1) = ssccChk Then 90 Debug.Print "valid SSCC" 100 Else 110 Debug.Print sampleCode & " Fails the sscc checksum calaulation" 120 End If End Function
Below is a test routine to do a SSCC code validation/check digit calculation.
You can change the check digit and test (to show effect of an invalid check digit).Code:Sub testSSCCChk() Dim sampleCode As String 'sample sscc code '007189085627231896 'from 'https://www.morovia.com/kb/Serial-Shipping-Container-Code-SSCC18-10601.html sampleCode = "007189085627231896" Debug.Print "valid check digit is " & ssccChk(sampleCode) End Sub
example: '007189085627231897 (bad check digit)
Last edited by orange; 10-16-2021 at 07:13 AM. Reason: spelling