I am using Bartender Activex Control, I pull the record set from
database and then passed to the substring in the label format. But
sometimes
the Substring cannot be updated with the new record set
Rst("barcode"). The
substring FihBarcode just print the previous one label content. I am
sure that the Rst("Barcode")has no problem. And I guess that the
Substring cannot be updated is because the Bartender just skip
updating the Substring. But for most times, the Substring can be
updated. The Substring name is FihBarcode in the following code that I
posted. What I found is the fih_text2 can be updated with the
recordset Rst("barcode"), but the FihBarcode cannot be
updated with the recordset Rst("barcode"), the FihBarcode just print
the
previous one label content. Please Help. Thanks
Dim BtApp As New BarTender.Application
Dim BtFormat As New BarTender.Format
Set BtFormat = BtApp.Formats.Open("c:\format2.btw")
strSQL = "select *, invoice.inbound_number as inbound_number_invoice
from invoicebarcode join invoice on invoicebarcode.inbound_number " &
_
" = invoice.inbound_number and invoicebarcode.customer_invoice_no = "
& _
" invoice.customer_invoice_no where invoicebarcode.inbound_number = '"
& txtInboundNumber & "' and invoicebarcode.customer_invoice_no = '" &
txtInvoiceNo & "'"
Rst.Open strSQL, Cnn
While Not Rst.EOF
BtFormat.SetNamedSubStringValue "invoice_text", ""
BtFormat.SetNamedSubStringValue "InvoiceBarcode", ""
BtFormat.SetNamedSubStringValue "fih_text2", ""
BtFormat.SetNamedSubStringValue "FihBarcode", ""
BtFormat.SetNamedSubStringValue "Packages", ""
BtFormat.SetNamedSubStringValue "Inbound_Number", ""
BtFormat.SetNamedSubStringValue "invoice_text",
Rst("customer_invoice_no")
BtFormat.SetNamedSubStringValue "InvoiceBarcode",
Rst("customer_invoice_no")
BtFormat.SetNamedSubStringValue "fih_text2", Rst("barcode")
BtFormat.SetNamedSubStringValue "FihBarcode", Rst("barcode")
BtFormat.SetNamedSubStringValue "Packages", Rst("inv_packages")
BtFormat.SetNamedSubStringValue "Inbound_Number",
Rst("inbound_number_invoice")
BtFormat.PrintOut
Rst.MoveNext
Wend
BtFormat.Close
Set BtFormat = Nothing
BtApp.Quit
Rst.Close