How to Use Seek and MoveNext to Find a Group/Range of Records (110497)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q110497 SUMMARY
The Seek method can search for a value only in an indexed field. Seek can
find only one record at a time. The Seek method alone cannot find all
duplicate field values.
After doing a Seek, to find a group of records that have indexed field
values that are duplicates or within a given range, you must do a series of
move methods (MoveNext or MovePrevious). After each move method in a loop,
you must check the indexed field value until your criteria is exceeded. The
indexed field values are automatically in alphabetical or numerical order.
The sample program below uses a Seek method, then uses MoveNext in a loop
to roughly emulate the FindNext method.
NOTE: FindNext applies only to Dynasets or Snapshots. The Seek method
applies only to Table object variables.
Modification Type: | Major | Last Reviewed: | 10/30/2003 |
---|
Keywords: | KB110497 |
---|
|