Delete Database Record - VBA
Hello All
I have some labels connected with Access DB that stores unique codes. So after printing them there is a need to delete or move these records in order to avoid printing again.
Is there a BarTender VBA command to delete these records from the DB after printing them?
Below is my code:
Dim BarTender As Object
Dim BtApp As BarTender.Application
Dim BtFormat As BarTender.Format
Set BtApp = New BarTender.Application
Set BtFormat = BtApp.Formats.Open(file_path)
BtFormat.PrintSetup.Printer = printer
BtFormat.PrintSetup.UseDatabase = True
BtFormat.PrintOut
BtFormat.Close btDoNotSaveChanges
BtApp.Quit
-
Hello Boris,
Thank you for reaching out to us on the Community Forums.
As an alternative to using VB script, you may instead try one of the following methods:
- Use Document Actions (File > BarTender Document Options) with a 'Delete Database Record Action' which requires the Automation Edition or higher:
- For the Database Field, choose the option to 'Update record when data source changes' from the Data Sources Property Page:
If you prefer to use VB Script then our Professional Services team may be able to assist with this at a cost.
Best regards,
Otto Roberson
0 -
Boris Pelichek Bueno
★ BarTender Hero ★
Hi, Otto
Thank you, this is a nice solution.
I have the Enterprise Automation edition (2016), but I can't find these features.
Best regards,
Bóris
0 -
Dear Boris,
Thank you for your reply. The Form and Document Actions were added in BarTender 2019. If you would like to try them out you can register and download the 30-day trial version.
An alternative approach would be through our Integration platform. Integration Builder is our middleware application which allows you to quickly integrate BarTender to many types of databases to automate printing.
For more information on how to build a database integration, please refer to the following resources:
- BarTender Help System > Companion Applications > Integration Builder, also available online
- Building a Database Integration
- The Integration Platform section of our Knowledge Base
Best regards,
Otto Roberson
Best regards,
0
請登入寫評論。
評論
3 條評論