Hiding 2 Objects Based On A Access Database Field
Heya,
Currently using Bartender 9.01 and need some help with it's VBA, unfortunately i'm not really familiar with BT VBA
I'm trying to write a VBA script that instructs bartender to not print 2 fields based on another value of a field, which effectively grabs the data from an access database
anyhow, at this time i keep getting a Line 6 Type Mismatch: 'Object' error message
Any suggestions?
'Automatically called whenever the value of the Sub String is needed.
'Set the Value property to set the value of this sub string.
If Field("NoBestBefore") = "1" Then
Value = ""
Object("Text 17").PrintVisibility = False
Else
If IsNumeric(BBOffset) Then
Value = DateAdd("d",BBOffset,DateAdd("d",0,PackedDate))
Else
Value = "Error"
Object("Text 17").PrintVisibility = False
End if
End If
-
Shotaro Ito
★ BarTender Hero ★
Object Automation in VB Script is introduced from BarTender 9.30 Automation edition or above, so unfortunately at 9.01 ”PrintVisibility" property was not supported.
Besides, BarTender's text object will not be printed if data source is empty.
Give share name to the data source of Text 17 (ex. TX17), then have script like..
If Field("NoBestBefore") = "1" Then Value = "" TX17 = "" Else TX17 = "Best Before:" End ifThis topic might helps.
From BarTender 10.1 Automation edition or above, conditional print is introduced - such as Print when <Database Field X> is Not empty etc, so please try the latest version too.
http://www.seagullscientific.com/label-software/whitepapers/whitepaper_whatsnewinbt101.pdf
0 -
cheers for your help.
after a few more Trial and Errors after posting, i've ended up doing something similar to such, though slightly bloated.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare