CheckBox.DataSource

From Xojo Documentation

Revision as of 19:07, 3 September 2020 by THill (talk | contribs) (Text replacement - "{{DeprecatedItemItem|" to "{{DeprecatedItem|")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Property (As String )
aCheckbox.DataSource = newStringValue
or
StringValue = aCheckbox.DataSource

Supported for all project types and targets.

The DataControl that references a table in a database whose fields are displayed.

Notes

Use the DataField property to link a field to be displayed in a CheckBox. In the IDE, a popup menu of field names will appear in the Properties pane. When setting in code, it takes a String. Assign it to the Name property of a DataControl. Note: Database fields can also be displayed using TextFields and TextAreas, ListBoxes, and Label controls.

Example

The following example links the Checkbox to a database and a field in the database.

Me.DataSource = "database"
Me.DataField = "color"