Syntax Issue Follow

Legacy Poster

We have the professional edition 10.1 SR3, not the automation one, if that matters.


I just want a field to print depending on the value of another one.   If Wh=S0 I want the Text7 (not attached to a source, just static text 'NON-STOCK') to show and I want my Barcode1 object to now show.  See the attachment.


I used the 'Printer Code Modifier';   I dragged the object Field("tblLabel.WH") from the choices and did that simple test.



Dim MyVar

If Field("tblLabel.WH") ="S0" Then 

End If




It keeps giving me error "Mismatch 'Field'".


I played with various syntax found on internet, derived from; examples like


  • Format.NamedSubStrings("Field1").Value
  • Format.Objects("Text 1").PrintVisibility
  • or simply value="" vs value ="NON-STOCK"


I had a look at


but spent way too much time on this, with only errors... I can't even pass the 1st line; the syntax of this BarTenderMs vbscript seems to be very unique!


Thanks for any help 





Ian Cummings
Comment actions Permalink

The Print Code Modifier (PCM) is the wrong tool to use for this.  In the object/data source that you wish to optionally print or not, use an event VB script with your If..Then statement.  Note that you use the "value = X" expression to set the value of the script's data source.  Set it to something for it to print, and nothing "" if you don't want it to print.

Please sign in to leave a comment.