Disappearing VB script Follow
Good day, I have a client running Bartender 2019 R9 Automation version 11.1/156128 (64-bit)
I configured a label template with a table object and am populating the table using the following VB script on OnFillList event:
strConn = "Provider=MSDASQL;DSN=Granite;"
Set objConn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rs = objConn.Execute("SELECT MasterItem.Description, SUM(ActionQty) as Qty "&_
"FROM Document INNER JOIN "&_
"[Transaction] ON Document.ID = [Transaction].Document_id INNER JOIN "&_
"MasterItem ON [Transaction].FromMasterItem_id = MasterItem.ID "&_
"WHERE [Transaction].[Type] = 'PICK' AND Document.Number =
"GROUP BY MasterItem.Description")
Value = ""
Do Until rs.EOF
Value = Value & rs.fields(0) & VbTab & rs.fields(1) & vbCr
The code works perfectly and prints as expected
The problem is that the VB code seems to disappear when I save and close the Bartender document. Every time I open the .btw file, I need to copy the code back in to the OnFillList event in order to print the necessary data.
I've tried creating the label over from scratch, but I can't seem to get the code to save with label file. Any help in this matter would be greatly appreciated!