
Move to next record in DAO
Sounds like that is what is happening. With a button array,
I am using something like:
------------------------------------------------------------
---------
Private Sub cmdQCMain_Click(Index As Integer)
On Error Resume Next
If dbOpen = False Then Exit Sub
Select Case Index
Case 0
'goto first record of rs
rs.MoveFirst
QCDisplay
Case 1
'goto to previous record of rs
rs.MovePrevious
QCDisplay
Case 2
'goto next record of rs
rs.MoveNext
QCDisplay
Case 3
'goto the last record of rs
rs.MoveLast
QCDisplay
Case 4
CloseRS
QCCLS
End Select
If rs.BOF = True Then
cmdQCMain(0).Enabled = False
cmdQCMain(1).Enabled = False
Else
cmdQCMain(0).Enabled = True
cmdQCMain(1).Enabled = True
End If
If rs.EOF = True Then
cmdQCMain(2).Enabled = False
cmdQCMain(3).Enabled = False
Else
cmdQCMain(2).Enabled = True
cmdQCMain(3).Enabled = True
End If
End Sub
-----------------------------------------------
I'll try to find your address and send you a picture of the
screen to help clear things up.
Good luck.
Quote:
>What error message you get?
>are you using movenext method of recordset and checking end
of record using EOF
>property before using movenext
>Sherly I.
>http://www.insearchofpeace.org
>http://www.voiceofwilderness.com
>Now you can watch JESUS CALLS videos at:-
>http://www.voiceofwilderness.com/Jesuscalls
>> Hi to all,
>> I just started programming in VB and have limited
programming experience in
Quote:
>> Access 97.
>> I have a quick and neophyte question.
>> I have developed a form that connects to an Access
database using DAO. On
Quote:
>> the form I have button that when clicked moves to the
next record. The code
Quote:
>> works fine the first time I click the control after that
it doesn't work.
>> Any suggestions/help would be appreciated
>> Thanks
>> Jose