Label.DataField

From Xojo Documentation

Property (As String )
aLabel.DataField = newStringValue
or
StringValue = aLabel.DataField

Supported for all project types and targets.

The name of a field in the table referenced by DataControl.

Relevant only if the Label is used in conjunction with a DataControl to display the contents of fields in a database table.

Sample Code

This code sets the DataSource and DataField properties of the control.

Me.DataSource = "Movies"
Me.DataField = "Director"