The information in this article applies to:
SYMPTOMSYou receive the error "No Current Record" when referencing a database field that has been added to a collection. The code may have functioned without error in Visual Basic 4.0. CAUSEThe Collection Object in Visual Basic 5.0 and later provides more flexibility when adding objects to a collection. To provide that additional level of functionality, Visual Basic 5.0 and later no longer make any assumptions about the item you are adding to the collection and will therefore add exactly what you specify. This differs from previous versions of Visual Basic where adding a reference to a field actually added the contents of that field's default property. For example, the following line of Visual Basic 4.0 code would add the contents of the "LastName" field (such as the text string "Smith") to the collection:
This same line of code in Visual Basic 5.0 or later adds a reference to the
field as a whole to the collection rather than the contents of the field.
The Visual Basic 5.0 or later equivalent to the above line of code would
be:
Therefore the programmer should be explicit in determining what is added to
a collection.
STATUSThis behavior is by design. MORE INFORMATIONSteps to Reproduce Behavior
Additional query words: kbDAO kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport
Keywords : kbGrpVB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |