Information générale
Catégorie:
Codage, syntaxe et commandes
>I am using VB6 and Access97. I am using the data control object to move though the records on the form.
>
>However, if an ID is passed into the form, how can I SEEK or LOCATE that record and display that record in the form?
>
>Thanks,
>
>Jerryt
Jerry,
Assuming you are using ADO, the equivalent of Locate would be the Find method of the rs object. To use seek the provider needs to support indices, which I believe the jet provider does. The method would be Seek on the recordset object.
You can check if Seek is supported by the provider with Supports(adSeek) method of the recordset object. See exact syntax and examples on the ADO help in MSDN.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement