Bt V9.2 // Barcode Print Visibility Based On Database Value
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).
-
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 -
The solution ended up being as follows:
if Field("LabelName.FieldName") = "100" then
value = ""
else
value = "DATA"
end if
0
Please sign in to leave a comment.
Comments
2 comments