Information générale
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Do the .MoveNext or .MovePrevious first, then check for .EOF() or .BOF() and act accordingly ( as in your example).
HTH
>Hello,
>
> I am having a minor problem with an ADO recordset. I have a form with navigation buttons on it(previous and Next). When I click on of these buttons from the first or last record in the recordset, all the linked controls on my form go blank. This would indicate to me that for some reason there is a blank record in the recordset, though I don't know why. Has anyone else had the same problem? What can I do to avoid this? I have included the code for the next button below....
>
>Here's the code:
>....If objRS.EOF() Then
> If Me.NavMessage = True Then
> response = MsgBox("This is the last record.", vbOKOnly, Me.Title)
> objRS.MoveLast
> End If
> Else
> objRS.MoveNext
> End If.....
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