PRB: Illegal to Use Find Method with Table Object Variable (106270)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q106270 SYMPTOMS
Using the FindFirst, FindNext, FindLast, or FindPrevious method on an
object variable of type Table results in this error:
Can't perform operation; it is illegal.
Pressing the F1 key on this error dialog gives the following description
from the Visual Basic Help:
Error 3219.
You tried to use a method or property with or on a recordset,
and it isn't valid for that object.
CAUSE
The FindFirst, FindNext, FindLast, and FindPrevious methods can be used
only with a Dynaset or Snapshot. These Find methods cannot be used with a
Table object variable.
WORKAROUND
To move between the records of a Table, use the Seek method or the Move
methods (MoveFirst, MoveLast, MoveNext, and MovePrevious).
Also, you can create a Dynaset or Snapshot variable on the whole Table
by using the CreateDynaset or CreateSnapshot method. Then you can use
the FindFirst, FindNext, FindLast, and FindPrevious methods on that Dynaset
or Snapshot. The Find methods move between records that meet specific
conditions.
STATUS
This behavior is by design.
REFERENCES
See "Positioning the Current Record in a Recordset" on Pages 68-77 of
the Visual Basic Professional Edition, version 3.0, "Professional Features
Book 2" manual. Page 72 states, "The Find methods cannot be used on Table
objects."
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | kbprb KB106270 |
---|
|