Centar za edukaciju-BiH



#121 14.04.2015 13:09
Dan79 Van mreze
Clan
Registrovan od:02.03.2015
Postovi:83


Predmet:Re: Prihodi i rashodi
kako mogu dobiti barcod u accessu nigdje ne vidim taj ActiveX Barcode Control ?
↑  ↓

#122 14.04.2015 13:31
Gjoreski Van mreze
Administrator
Registrovan od:02.02.2009
Postovi:1,830


Predmet:Re: Prihodi i rashodi
Ima funkcija za stampajne barcod Ne ti treba ocx no dokolku sakas mozam da ti dadam I ocx za barcod.
Jas imam zebra label printer I koristam protokoli za stampajne barcodovi
↑  ↓

#123 14.04.2015 13:34
zxz Van mreze
Administrator
Registrovan od:03.02.2009
Postovi:10,612


Predmet:Re: Prihodi i rashodi
Ima cak i font negdje na forumu za stampanje bar koda.
Medjutim ima tu problema u zavisnosti koji bar kod hoces.
Ako je samo interni bar kod onda je nebitno.
Podrška samo putem foruma, jer samo tako i ostali imaju koristi od toga.
↑  ↓

#124 14.04.2015 13:38
Dan79 Van mreze
Clan
Registrovan od:02.03.2015
Postovi:83


Predmet:Re: Prihodi i rashodi
ovako vježbam access i radim si usput nekakvu bazu za skladište.
želim iskoristii barcod koji več imaju knjige na sebi, a one koje nemaju da ja napravim.
dali je moguče to?
i jos pitanje imam polje Å¡ifra za te knjige i recimo do sada sam koristio naljepnice gdje sam pisao sifre ovakve 0001/1+20 znaci sifra je 0001 ovo iza/ (1 ili 20)je količina kako da to dobijem u accesu?
↑  ↓

#125 14.04.2015 16:21
Gjoreski Van mreze
Administrator
Registrovan od:02.02.2009
Postovi:1,830


Predmet:Re: Prihodi i rashodi
Ne e praticno a nema I logika sifrata da sodrzi I kolicina
↑  ↓

#126 14.04.2015 18:48
zxz Van mreze
Administrator
Registrovan od:03.02.2009
Postovi:10,612


Predmet:Re: Prihodi i rashodi
Kop sto rece @Gjoreski nema nikakve svrhe da kolicina bude u sifri jer kolicina je promjenljiva pa bi stalno morao nijenjati sifru. To nema nikakav smisao.
Nadji nesto drugo.
Mozes generisati i sam kod za bar kod.
Stavis neku jedinstvenu projku te ostampas bar kodove na artikle i polijepis.
Ako artikli vec imaju bar kod mozes ih skenieari bar kod aparatom direktno u bazu.
Podrška samo putem foruma, jer samo tako i ostali imaju koristi od toga.
↑  ↓

#127 15.04.2015 08:27
miro35 Van mreze
Clan
Registrovan od:05.01.2009
Postovi:608


Predmet:Re: Prihodi i rashodi
Evo za barcode.Napravi dva modula.Prvi je
PreuzmiIzvorni kôd (Text):
  1. Option Explicit
  2. ' Written by Rodney Marr (RodMarr@mailcity.com) October 7, 2000
  3. '
  4. ' Barcode 128-B Generator
  5. '
  6. ' Permission granted for public use and royalty-free distribution.
  7. ' No mention of source or credits is required.
  8. '
  9. ' I got a lot of help from the following people's work
  10. ' Russ Adams' BarCode 1 Web Page   http://www.adams1.com/pub/russadam/info.html
  11. ' A Free 128-B code generator in Visual Basic by Stefan Karlsson (mrswede@libertysurf.se)
  12. ' And the Creator of the code 39 Module
  13. '
  14. 'For Notes on how to use this code look at the code for the barcode39 Generator
  15.  
  16. Public Function SetBarData(Ctrl As control, rpt As Report)
  17.    
  18.     On Error GoTo ErrorTrap_SetBarData
  19.    
  20.     'Code 128B has 5 main parts to it. The first part is a start character(211214), followed by DataCharcters. The Data
  21.     'Characters are followed by a check(or Checksum) Character, and that is followed by a stop Character(2331112)
  22.     'The last part of Code 128B is the two quiet sections at the front and back of the barcode. These are 10 dimensions
  23.     'Long(I am thinking that is 11 modules long). Each character is 11 modules long, except the stop character which is
  24.     '13 modules long
  25.    
  26.     Dim CharNumber As Variant, CharData As Variant, CharBarData As Variant, Nratio As Variant, Nbar As Variant
  27.     Dim barcodestr As String, Barcode As String, Barchar As String, Barcolor As Long, Parts As Integer, j As Integer
  28.     Dim tsum As Integer, lop As Integer, s As Integer, checksum As Integer, P As Integer, barwidth As Integer
  29.     Dim boxh As Single, boxw As Single, boxx As Single, boxy As Single, Pix As Single, Nextbar As Single
  30.     Const White = 16777215: Const Black = 0
  31.    
  32.     'This is the Raw data that I threw into an arrays
  33.     CharNumber = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16,", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29,", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106")
  34.     CharData = Array("SP", "!", Chr(34), "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "I", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "DEL", "FNC 3", "FNC 2", "SHIFT", "CODE C", "FNC 4", "CODE A", "FNC 1", "Start A", "Start B", "Start C", "Stop")
  35.     CharBarData = Array("212222", "222122", "222221", "121223", "121322", "131222", "122213", "122312", "132212", "221213", "221312", "231212", "112232", "122132", "122231", "113222", "123122", "123221", "223211", "221132", "221231", "213212", "223112", "312131", "311222", "321122", "321221", "312212", "322112", "322211", "212123", "212321", "232121", "111323", "131123", "131321", "112313", "132113", "132311", "211313", "231113", "231311", "112133", "112331", "132131", "113123", "113321", "133121", "313121", "211331", "231131", "213113", "213311", "213131", "311123", "311321", "331121", "312113", "312311", "332111", "314111", "221411", "431111", "111224", "111422", "121124", "121421", "141122", "141221", "112214", "112412", "122114", "122411", "142112", "142211", "241211", "221114", "413111", "241112", "134111", "111242", "121142", "121241", "114212", "124112", "124211", "411212", "421112", "421211", "212141", _
  36.                                           "214121", "412121", "111143", "111341", "131141", "114113", "114311", "411113", "411311", "113141", "114131", "311141", "411131", "211412", "211214", "211232", "2331112")
  37.                                          
  38.     barcodestr = "211214" 'Add the Startcode for Start B (characterset B) to the barcode string
  39.     tsum = 104            'And this is the value for that startcode which will be added with the other character values to find the checksum character
  40.    
  41.     boxx = Ctrl.Left
  42.     boxy = Ctrl.TOP
  43.     boxw = Ctrl.Width
  44.     boxh = Ctrl.Height    'Get control size and location properties.
  45.    
  46.     Barcode = Ctrl        'Set handle on control.
  47.  
  48.     Nratio = Array("0", "15", "30", "45", "60")       'Set up the array for the different bar width ratios
  49.     Parts = ((11 * (Len(Barcode))) + 35) * Nratio(1)  'This is the formula for the width of the barcode
  50.     Pix = (boxw / Parts)                              'Here I find out exactly how many Pixels a bar will be
  51.     'Set up the array to handle the pixels for each type of bar
  52.     Nbar = Array((Nratio(0) * Pix), (Nratio(1) * Pix), (Nratio(2) * Pix), (Nratio(3) * Pix), (Nratio(4) * Pix))
  53.    
  54.     'Loop through all bardata to count the sum for all characters and add barcode charcter strings the to the barcode string
  55.     For lop = 1 To Len(Barcode)
  56.         Barchar = Mid(Barcode, lop, 1)
  57.         If Barchar = " " Then Barchar = "SP"
  58.         For s = 0 To UBound(CharData)
  59.             If Barchar = CharData(s) Then
  60.                 barcodestr = barcodestr & CharBarData(s) 'This is where I added the character strings to each other to make one long string of 1's, 2's, 3's, & 4's
  61.                 tsum = tsum + (CLng(CharNumber(s)) * lop) 'Here every barcode character's number value is multiplied by its position in the line and added to tsum
  62.                 'The actual formula for find the the  Checksum  is "(104 + (1 * CharcterNumber) + (2 * CharcterNumber) + ...)/103"
  63.                 'You would Use the Remainder as
  64.                 'The Checksum Character. In the case of "BarCode 1" the formula would look
  65.                 'like "(104+(1*34)+(2*65)+(3*82)+(4*35)+(5*79)+(6*68)+(7*69)+(8*0)+(9*17))/103=20 with Remainder of 33"
  66.                 'Therefore the checksum would equal 33
  67.                 Exit For
  68.             End If
  69.         Next s
  70.     Next lop
  71.        
  72.     checksum = tsum - (Int(tsum / 103) * 103)                   'Here I use the the totat sum (tsum) to find the checksum
  73.     barcodestr = barcodestr & CharBarData(checksum) & "2331112" 'Here I add the checksum then the stop character into the barcode string
  74.        
  75.     'lets do some initialization
  76.     Barcolor = Black
  77.     Nextbar = boxx + 11     'I added the 20 for the whitespace (or quiet space) at the beginning of the barcode
  78.    
  79.     'Draw the Barcode
  80.     For j = 1 To Len(barcodestr)
  81.         Barchar = Mid(barcodestr, j, 1)   'Reuse variable barchar to store the character to be drawn
  82.         barwidth = CInt(Barchar)          'Change the barcode charcter into an integer so I can use in the array part of the next line
  83.         rpt.Line (Nextbar, boxy)-Step(Nbar(barwidth), boxh), Barcolor, BF  'Draw the line
  84.         Nextbar = Nextbar + Nbar(barwidth)                                                      'Calculate the next starting point
  85.         If Barcolor = White Then Barcolor = Black Else Barcolor = White      'Swap line colors
  86.     Next j
  87.  
  88. Exit_SetBarData:
  89.     Exit Function
  90.  
  91. ErrorTrap_SetBarData:
  92.     MsgBox Error$
  93.     Resume Exit_SetBarData
  94.  
  95. End Function
Ovaj modul nazovi:Mod_Barcode_Generator_Code128B
Miro
↑  ↓

#128 15.04.2015 08:27
miro35 Van mreze
Clan
Registrovan od:05.01.2009
Postovi:608


Predmet:Re: Prihodi i rashodi
Zatim ovaj modul nazovi ga: mod_BarCode_Generator_Code39

PreuzmiIzvorni kôd (Text):
  1. Option Compare Database   'Use database order for string comparisons
  2. Option Explicit
  3. '
  4. ' mod_BarCode_Generator_Code39
  5. '
  6. ' Barcode Generator for Code 3 of 9, Code 39, and Mil-spec Logmars.
  7. '
  8. ' version 2.0 (updated for MsAccess 97)
  9. '
  10. ' (c) 1993-1999 James Isle Mercanti, Cocoa Beach, FL 32931  USA
  11. ' Permission granted for public use and royalty-free distribution.
  12. ' No mention of source or credits is required. All rights reserved.
  13. '
  14. ' TO USE THIS CODE:
  15. '
  16. '   1 - Create Report with a TextBox control. (example named Barcode)
  17. '       Make sure the Visible property is set to "No".
  18. '   2 - Set On-Print property of section to [Event Procedure]
  19. '       by clicking on the [...] and selecting "Code Builder"
  20. '   3 - Confirm that the following code matches yours...
  21. '
  22. '      Sub Detail1_Print (Cancel As Integer, PrintCount As Integer)
  23. '
  24. '         Result = MD_Barcode39(Barcode, Me)
  25. '
  26. '      End Sub
  27. '
  28. '   4 - NOTE: The name of the section is "Detail1" for example only!
  29. '       Your section might show a different name. Ditto for "Barcode".
  30. '
  31. '   5 - NOTE: To use on sub-forms, the Report name should be hard-coded
  32. '       into the function. i.e. Rpt = Reports!MainForm!SubForm.Report.
  33. '       The easy method is to just avoid using sub-forms and sub-reports.
  34. '
  35.  
  36. Function MD_Barcode39(Ctrl As control, rpt As Report)
  37.    
  38.     On Error GoTo ErrorTrap_BarCode39
  39.    
  40.     Dim Nbar As Single, Wbar As Single, Qbar As Single, Nextbar As Single
  41.     Dim CountX As Single, CountY As Single, CountR As Single
  42.     Dim Parts As Single, Pix As Single, Color As Long, BarCodePlus As Variant
  43.     Dim Stripes As String, BarType As String, Barcode As String
  44.     Dim Mx As Single, my As Single, Sx As Single, Sy As Single
  45.     Const White = 16777215: Const Black = 0
  46.     Const Nratio = 20, Wratio = 55, Qratio = 35
  47.    
  48.     'Get control size and location properties.
  49.     Sx = Ctrl.Left: Sy = Ctrl.TOP: Mx = Ctrl.Width: my = Ctrl.Height
  50.    
  51.     'Set handle on control.
  52.     Barcode = Ctrl
  53.    
  54.     'Calculate actual and relative pixels values.
  55.     Parts = (Len(Barcode) + 2) * ((6 * Nratio) + (3 * Wratio) + (1 * Qratio))
  56.     Pix = (Mx / Parts):
  57.     Nbar = (20 * Pix): Wbar = (55 * Pix): Qbar = (35 * Pix)
  58.    
  59.     'Initialize bar index and color.
  60.     Nextbar = Sx
  61.     Color = White
  62.    
  63.     'Pad each end of string with start/stop characters.
  64.     BarCodePlus = "*" & UCase(Barcode) & "*"
  65.    
  66.     'Walk through each character of the barcode contents.
  67.     For CountX = 1 To Len(BarCodePlus)
  68.        
  69.         'Get Barcode 1/0 string for indexed character.
  70.         Stripes = MD_BC39(Mid$(BarCodePlus, CountX, 1))
  71.         For CountY = 1 To 9
  72.            
  73.             'For each 1/0, draw a wide/narrow bar.
  74.             BarType = Mid$(Stripes, CountY, 1)
  75.            
  76.             'Toggle the color (black/white).
  77.             If Color = White Then Color = Black Else Color = White
  78.             Select Case BarType
  79.                
  80.                 Case "1"
  81.                     'Draw a wide bar.
  82.                     rpt.Line (Nextbar, Sy)-Step(Wbar, my), Color, BF
  83.                     Nextbar = Nextbar + Wbar
  84.                
  85.                 Case "0"
  86.                     'Draw a narrow bar.
  87.                     rpt.Line (Nextbar, Sy)-Step(Nbar, my), Color, BF
  88.                     Nextbar = Nextbar + Nbar
  89.            
  90.             End Select
  91.         Next CountY
  92.        
  93.         'Toggle the color (black/white).
  94.         If Color = White Then Color = Black Else Color = White
  95.        
  96.         'Draw intermediate "quiet" bar.
  97.         rpt.Line (Nextbar, Sy)-Step(Qbar, my), Color, BF
  98.         Nextbar = Nextbar + Qbar
  99.        
  100.     Next CountX
  101.    
  102. Exit_BarCode39:
  103.     Exit Function
  104.  
  105. ErrorTrap_BarCode39:
  106.     Resume Exit_BarCode39
  107.  
  108. End Function
  109.  
  110. Function MD_BC39(CharCode As String) As String
  111.    
  112.     On Error GoTo ErrorTrap_BC39
  113.  
  114.     ReDim BC39(90)
  115.  
  116.     BC39(32) = "011000100" ' space
  117.     BC39(36) = "010101000" ' $
  118.     BC39(37) = "000101010" ' %
  119.     BC39(42) = "010010100" ' * Start/Stop
  120.     BC39(43) = "010001010" ' +
  121.     BC39(45) = "010000101" ' |
  122.     BC39(46) = "110000100" ' .
  123.     BC39(47) = "010100010" ' /
  124.     BC39(48) = "000110100" ' 0
  125.     BC39(49) = "100100001" ' 1
  126.     BC39(50) = "001100001" ' 2
  127.     BC39(51) = "101100000" ' 3
  128.     BC39(52) = "000110001" ' 4
  129.     BC39(53) = "100110000" ' 5
  130.     BC39(54) = "001110000" ' 6
  131.     BC39(55) = "000100101" ' 7
  132.     BC39(56) = "100100100" ' 8
  133.     BC39(57) = "001100100" ' 9
  134.     BC39(65) = "100001001" ' A
  135.     BC39(66) = "001001001" ' B
  136.     BC39(67) = "101001000" ' C
  137.     BC39(68) = "000011001" ' D
  138.     BC39(69) = "100011000" ' E
  139.     BC39(70) = "001011000" ' F
  140.     BC39(71) = "000001101" ' G
  141.     BC39(72) = "100001100" ' H
  142.     BC39(73) = "001001100" ' I
  143.     BC39(74) = "000011100" ' J
  144.     BC39(75) = "100000011" ' K
  145.     BC39(76) = "001000011" ' L
  146.     BC39(77) = "101000010" ' M
  147.     BC39(78) = "000010011" ' N
  148.     BC39(79) = "100010010" ' O
  149.     BC39(80) = "001010010" ' P
  150.     BC39(81) = "000000111" ' Q
  151.     BC39(82) = "100000110" ' R
  152.     BC39(83) = "001000110" ' S
  153.     BC39(84) = "000010110" ' T
  154.     BC39(85) = "110000001" ' U
  155.     BC39(86) = "011000001" ' V
  156.     BC39(87) = "111000000" ' W
  157.     BC39(88) = "010010001" ' X
  158.     BC39(89) = "110010000" ' Y
  159.     BC39(90) = "011010000" ' Z
  160.    
  161.     MD_BC39 = BC39(Asc(CharCode))
  162.  
  163. Exit_BC39:
  164.     Exit Function
  165.  
  166. ErrorTrap_BC39:
  167.     MD_BC39 = ""
  168.     Resume Exit_BC39
  169.  
  170. End Function

Miro
↑  ↓

#129 15.04.2015 08:31
miro35 Van mreze
Clan
Registrovan od:05.01.2009
Postovi:608


Predmet:Re: Prihodi i rashodi
Poziva se ovako:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
ls_DetailOnPrint Me
result = MD_Barcode39(ArtSif, Me)
End Sub

Znači na dogadjaju on print na reportu staviÅ¡ polje kako ti se zove za Å¡ifru artikla.VidiÅ¡ u mene se zove ArtSif a ti stavi kako se tvoje zove. I onda će ti na reportu ispisivati barcode. Recimo ti staviÅ¡ Å¡ifru 001 on će na reportu pokazati barcode
Miro
↑  ↓

#130 15.04.2015 14:16
Dan79 Van mreze
Clan
Registrovan od:02.03.2015
Postovi:83


Predmet:Re: Prihodi i rashodi
ok hvala svima pokusati cu pa se javim kako mi islo Smiling
↑  ↓

Stranice (16):1,2 ... 11,12,13,14,15,16

Sva vremena su GMT +02:00. Trenutno vrijeme: 9: 07 am.