ADODB Object
 
Syntax
 
string = recordsetobject.Index
recordsetobject.Index = string
 
Description
Sets or returns a string value that is the name of the index in effect.
 
The Index property sets or returns a string value that refers to the name of the current index for a Recordset object. This current index must have been previously created either as an index on the base table or an ADOX Index object.
 
The basic concept is to create an indexed display of the records and to use the companion Seek method to search these indexed records.
 
Few providers support this property.
 
You can set this property on an open or closed Recordset object. Note that you can always successfully set this property when the Recordset is closed, but if the provider does not recognize this property, the Recordset will not open properly. If you try to set the Index property on an open Recordset and the provider does not recognize this property, an error will be generated.
See Also
Example
 
If objRecordset.Supports(adIndex) Then
   objRecordset.Index = "AddressIndex"
End If