SelTop, SelLeft Properties
Applies To
Form, QueryDef object, Table, TableDef object.
Description
You can use the SelTop property to specify or determine which row (record) is topmost in the current selection rectangle in a table, query, or form datasheet, or which selected record is topmost in a continuous form. You can use the SelLeft property to specify or determine which column (field) is leftmost in the current selection rectangle. For example, if you've selected a group of rows and columns within Datasheet view of the Customers table, you can use the SelTop and SelLeft properties to determine the first row and first column selected in the selection rectangle.
Setting
- The SelTop property. A Long Integer value between 1 and the number of records in the datasheet or continuous form. The setting of this property specifies or returns the number of the topmost row in the current selection rectangle or the number of the topmost selected record in the continuous form.
- The SelLeft property. A Long Integer value between 1 and the number of columns in the datasheet. The setting of this property specifies or returns the number of the leftmost column in the current selection rectangle.
These properties aren't available in Design view. These properties are available only by using a macro or Visual Basic.
Remarks
If there's no selection, the value returned by these properties is the row and column of the cell with the focus.
If you've selected one or more records in the datasheet (using the record selectors), you can't change the setting of the SelLeft property. If you've selected one or more columns (using the column headings), you can't change the setting of the SelTop property.
You can use these properties with the SelHeight and SelWidth properties to specify or determine the actual size of the selection rectangle. The SelTop and SelLeft properties determine the position of the upper-left corner of the selection rectangle. The SelHeight and SelWidth properties determine the lower-right corner of the selection rectangle.
See Also
SelHeight, SelWidth properties.
Example
See the SelHeight, SelWidth properties example.