Bt V9.2 // Barcode Print Visibility Based On Database Value Follow

0
Avatar
Legacy Poster

We are using v9.2 and have a label that has a barcode on it that we'd like to show/hide based on different field's database value, but am struggling to find the correct syntax.

 

In the OnProcessData script of the barcode object, I have the following VB script:

 

If (Field("receiving.warehouse") = "100" then

  format.objects("batchbarcode").visibility = false

else

  format.objects("batchbarcode").visibility = true

end if

 

I've tried both .visibility and .printvisibility, but I get the error #6900 (object doesn't support this property or method).

 

2 comments

0
Avatar
Legacy Poster
Comment actions Permalink

Scripts that deal with layout objects have to be in the "Document Properties" section. I have 10.1 so I'm not sure whether it's the same in 9.2 but for me, it's File > BarTender Document Options > VB Scripting.

0
Avatar
Legacy Poster
Comment actions Permalink

The solution ended up being as follows:

 

if Field("LabelName.FieldName") = "100" then

  value = ""

else

  value = "DATA"

end if

Please sign in to leave a comment.