CreateLabel Method (ActiveX/CAO)

Creates an attached or freestanding label.

Signature

VBA / VB.NET

RetVal = object.CreateLabel(Arg1, KeyValues, LabelTemplate [, DisplayValues])
object

Type: LinkTemplate

The object or objects this method applies to.

Arg1

Type: Long for object ID, or Variant (three-element array of Doubles); input-only

The graphical object to attach the label to, or the insertion point for a freestanding label.

KeyValues

Type: KeyValues; input-only

The key field values for the label.

LabelTemplate

Type: LabelTemplate, or String naming a label template; input-only

The label template for the label object.

DisplayValues

Type: Variant (array of Variants); input-only; optional

Values to be displayed in the label if no matching key field is found in the database table.

RetVal

Type: Label

The new label object.

Remarks

The values displayed in the created label depend on which arguments are passed to CreateLabel. Those values may be affected by a subsequent call to the Reload method. CreateLabel behaves as follows: