Referencing Database Fields

When you are connected to a database in your document, you can use the data in your database in your scripts.

In some cases, you may need to reference a specific database field using VBScript. The Script Editor contains a list of all fields in the database(s) connected to your document. Using VBScript, you return the value for the current record of a specified database field.

ClosedTo reference a database field using VBScript

  1. In the Script Assistant pane, expand the book called Database Fields.

  2. Locate the database field you want to reference, and double-click it. This will insert a piece of code into the Editor pane that references the selected database field.

When referencing database fields with conditional statements, BarTender may not identify all database fields that are used in your script. If your script does not execute as expected, you may need to "force reference" the database field. For more information, refer to Forcing References.

Related Topics