Zum Hauptinhalt gehen

Suche

Suche

Input Mask Nubie Needs Help! (Bartender Version 10)

Kommentare

11 Kommentare

  • Avatar
    Ian Cummings
    Moderator

    You would use a VB Script.  First though set the validation for numeric data only, and a min/max of 11 digits of input.  Next choose the "VB Script" transforms option and enter in something like the below script which cancels the print request if the model name is not what you want it to be:

     

    If Left(value,3) <> 810 Then
    	Call Format.CancelPrinting("Wrong document for input provided!") 
    End If
    

    Note that you'll need to adjust this statement on a per BarTender document basis.

    0
  • Avatar
    Legacy Poster

    Thanks.  That did the trick. 

    Much obliged!

    0
  • Avatar
    Legacy Poster

    Hi Ian (or if anybody else can help),

     

    The VB code from your last response worked well for the individual unit label but when we tried to apply this same code to our multipack carton label, we received continual error messages.  Rather than try to explain the mulitpack carton label, I've attached the file for your review.  Our manufacturing engineer and myself spent about 90 minutes trying to figure out how to get this to work with no luck.  We would be most grateful if you could take a look at the file and let us know your thoughts on how to apply this same feature from the unit label to each of the serial numbers listed on the multipack label.

     

    Thank you for any assistance you can provide.

    0
  • Avatar
    Legacy Poster

    Sorry - I forgot to attach the file in my last post.  Thanks again.

    0
  • Avatar
    Domingo Rodriguez
    Moderator

    You could create a global document based VBScript instead, so that you check the value for each and every bar code. If one of the bar code values entered is not what it should be, you could then call "Format.CancelPrinting()". This type of VBScript is accessed from the "File > BarTender Document Options" dialog and now under the VBScripting" tab. 

     

    Further instructions on this document level VBScript are found on the following White Paper:

    http://www.bartenderbarcodesoftware.com/label-software/whitepapers/Dynamically-Changing-Objects-At-Print-Time-Using-VB-Script.pdf

    0
  • Avatar
    Legacy Poster

    We didn't have any luck with the global command in VB scripting.  We used the same code given by Ian in the earlier post and, although we received no errors, we could type anything into the print job as the data source and Bartender allowed it to print.

     

    Just for further information, we went back and tried to use the original code in the individual serial numbers/barcodes (right-click over each individual barcode, clicked 'properties' and added the VB code given by Ian).  I've attached the error message we are seeing when we try this method to prevent incorrect data entries.  Please see the attached screenshot file.  Please help and thank you.

    0
  • Avatar
    Legacy Poster

    Can somebody please help with this?

    0
  • Avatar
    Canguita

    Hello Mark,

     

    Thank you very much for your post. Checking the error message it seems that there is a configuration issue with the data source. Can you attach your label file to check it?

     

    Thanks,

     

    Carlos

    0
  • Avatar
    Ian Cummings
    Moderator

    The error indicates that you've made a connection to a database/data file in your BarTender document, but that you then didn't use a data source in your label design that reads a field from the database/data file.  This has little to nothing to do with a VB script as given earlier.

    0
  • Avatar
    Legacy Poster

    The .btw file is attached at the top of this blog. 

    Thanks for helping with this.

    0
  • Avatar
    Ian Cummings
    Moderator

    I took a look at your label file.  As I stated previously, you have a DB connection setup, yet the data source for everyone of your objects is using embedded/fixed data.  Either disconnect the DB connection, or use a DB field in the data source of at least one label object.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.