Skip to main content

Search

Search

Show Or Hide A Qr Code Based On A Partial Field

Comments

2 comments

  • Avatar
    Shotaro Ito
    would line 6
    select case trim(arrLITM(numdata)) be
    select case trim(arrLITM(suffixCode)) ?
    0
  • Avatar
    Legacy Poster
    Yep ... that was it. I stared at that code for hours in the factory trying to make it work and never noticed it was a simple variable name that was wrong. Thank you! My new labels go into production today. Yay!

    In case anyone ever wants to do something similar ...

    From the File menu, go to "BarTender Document Options". Go to the "VB Scripting" tab, then select the "OnNewRecord" event. This is my code:

    [code]
    arrLITM = split(Field("DLPTRON.LITM"),"-")
    suffixCode = UBound(arrLITM)

    set theQR = Format.Objects("SERN_QR")

    select case trim(arrLITM(suffixCode))
    case "130","500","520","CZXXX","CZ500","FVE","FVV","CZ520","ITS","ITS50","ITS52","XXX"
    theQR.PrintVisibility = True
    case else
    theQR.PrintVisibility = False
    end select
    [/code]
    0

Please sign in to leave a comment.