Searches the index of a Recordset to quickly locate the row that matches the specified values, and changes the current row position to that row. > >Syntax > >recordset.Seek KeyValues, SeekOption > >Parameters > >KeyValues An array of VARIANT values. An index consists of one or more columns and the array contains a value to compare against each corresponding column. > >SeekOption A SeekEnum value that specifies the type of comparison to be made between the columns of the index and the corresponding KeyValues. Can be one of the following comparison constants. > >Constant Description >adSeekAfterEQ Seek either a key equal to KeyValues or just after where that match would have occurred. >adSeekAfter Seek a key just after where a match with KeyValues would have occurred. >adSeekBeforeEQ Seek either a key equal to KeyValues or just before where that match would have occurred. >adSeekBefore Seek a key just before where a match with KeyValues would have occurred. >adSeekFirstEQ Seek the first key equal to KeyValues. >adSeekLastEQ Seek the last key equal to KeyValues. > > >Remarks > >Use the Seek method in conjunction with the Index property if the underlying provider supports indexes on the Recordset object. Determine whether the underlying provider supports indexes with the Supports (adIndex) method. > >If Seek does not find the desired row, no error occurs, and the row is positioned at EOF. Set the Index property to the desired index before executing this method. > >This method can only be used when the Recordset object's CursorLocation property has a value other than adUseClient. >