RowSourceType Property

Example   Applies To   See Also

Specifies the type of source for the values in a control. Available at design time and run time.

Syntax

Control.RowSourceType[ = nSource]

Settings

nSource

The settings for the RowSourceType property are:

Setting Description
(Default) None. When the default value is used, fill the list at run time using the AddItem or AddListItem method.
Value. Populated by a comma-delimited list.
Alias. Use the ColumnCount property to select fields in the table.
SQL Statement. A SQL SELECT command that creates a cursor or a table.
Query (.qpr). Specify a file name with a .qpr extension.
Array. Set the columns property to display multiple dimensions.
Fields. A comma delimited list of fields. The fields may be prefaced by the table alias and a period.
Files. List is populated from the current directory. Specify file skeleton (such as *.dbf or *.txt) or mask in the RowSource property.
Structure. Fields from the table specified in RowSource.

Note that when RowSourceType is set to 8, if the RowSource property is empty the currently selected table is used as the source of the values in a ComboBox or ListBox control. Otherwise, the RowSource property specifies the alias of the table, the name of the table, or the name of the database used as the source of the values in a ComboBox or ListBox control.

Pop-up. Included for backward compatibility.

For more information about using each of the RowSourceType settings, see "Using List Boxes and Drop-Down List Boxes" in Chapter 10, Using Controls, in the Programmer's Guide.