Move to next record in DAO 
Author Message
 Move to next record in DAO

Hi to all,

I just started programming in VB and have limited programming experience in
Access 97.

I have a quick and neophyte question.

I have developed a form that connects to an Access database using DAO. On
the form I have button that when clicked moves to the next record. The code
works fine the first time I click the control after that it doesn't  work.

Any suggestions/help would be appreciated

Thanks

Jose



Sun, 16 Dec 2001 03:00:00 GMT  
 Move to next record in DAO
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

Quote:

> Hi to all,

> I just started programming in VB and have limited programming experience in
> Access 97.

> I have a quick and neophyte question.

> I have developed a form that connects to an Access database using DAO. On
> the form I have button that when clicked moves to the next record. The code
> works fine the first time I click the control after that it doesn't  work.

> Any suggestions/help would be appreciated

> Thanks

> Jose



Sun, 16 Dec 2001 03:00:00 GMT  
 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

- Show quoted text -

Quote:
>> works fine the first time I click the control after that
it doesn't  work.

>> Any suggestions/help would be appreciated

>> Thanks

>> Jose



Sun, 16 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to move to the next record?

2. Disable move to prev/next record when turning mouse wheel

3. How to move to the next record

4. How to make combo box move to next record

5. Doing Error Checking before moving to next record

6. Move next takes user to new record - not wanted

7. Move Next Record

8. Data control will not refresh/move to next record

9. How to move to the next record?

10. Disconnected Recordset will not move to the next record

11. Dao - Moving Recordset to First Record

12. Move Next or move previous

 

 
Powered by phpBB® Forum Software