Article ID: 108235
Article Last Modified on 1/8/2003
Table object
With data access, the Index property determines which existing index is the current index used to sort records in a Table and in recordsets created from that Table. The default is blank. The Index property is not available at design time and is available read/write at run time.
table.Index [ = indexname ]
The order of the data in a table is determined by the order in which the data is added to the table. To alter the order of records fetched from the table when using a Table object, set the Index property to the name of an index in the Indexes collection of the Table's TableDef object. For example, to set the index to be used on a Seek against the Titles table:
Dim Tb as Table, Db as Database
Set Db = OpenDatabase("Biblio.MDB")
Set Tb = Db.OpenTable("Titles")
Tb.Index = "PubID"
Tb.Seek "=", 3
The specified index must already be defined. If you set the Index
property to an index that doesn't exist, or if the index isn't set
when you use the Seek method, an error occurs.
String
Additional query words: 3.00 docerr
Keywords: KB108235