Referencing Database Fields

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

In some cases, you might want to reference a specific database field by using VBScript. The Script Editor contains a list of all fields in the databases that are connected to your document. By using VBScript, you return the value for the current record of a specified database field.

ClosedTo reference a database field by using VBScript

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

  2. Locate and then double-click the database field that you want to reference. This action inserts a snippet of code into the Editor pane that references the selected database field.

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

Related Topics