Delete Database Record - VBA Follow

0

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

3 comments

0
Avatar
Otto Roberson
Moderator
Comment actions Permalink

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:

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
Avatar
Boris Pelichek Bueno
Comment actions Permalink

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
Avatar
Otto Roberson
Moderator
Comment actions Permalink

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:

Best regards,

Otto Roberson

 

Best regards,

Please sign in to leave a comment.