Access DB Fields from VB Script within OnPrintStart Event Follow
I am trying to use a .btw file which has VB Script code within the OnPrintStart Event.
This worked fine in Bartender 10.0, but doesn't in Bartender 2019 R5.
The script looks like this:
if Field("GetBartenderQueue.ID") = 2 or Field("GetBartenderQueue.ID") = 3 then
Value=Field("GetBartenderQueue.STK-Verpackung") / Field("GetBartenderQueue.VPE-Inhalt")
GetBartenderQueue is a Query in an Access-Database, which is configured within the .btw file.
Bartender 2019 claims, that Field("GetBartenderQueue.ID") cant be found and that I should use ReferenceField at the beginning of the script. When I do this, this error still appears.
When I replace the Field(...) with ReferenceField(...) like
if ReferenceField("GetBartenderQueue.ID") = 2 or ReferenceField("GetBartenderQueue.ID") = 3 thenValue=""
Value=RefrenceField("GetBartenderQueue.STK-Verpackung") / RefrenceField("GetBartenderQueue.VPE-Inhalt")
an Overflow error appears.
I tried many different combinations now but none work. I truly dont understand what is going on and also the fact,
that Backward-compatibility doesn't seem a big Issue with Bartender (like also not supporting the the /w comamnd line switch anymore ...) is quite annoying.
How do I have to do this ? Maybe OnPrintStart was the right place in Bartender 10.0 but isn't in Barzender 2019 ?
Any hints are geratly appreciated!
Please sign in to leave a comment.