Displaying 10 data at one time - Error (1 Viewer)

cheer

Registered User.
Local time
Today, 11:24
Joined
Oct 30, 2009
Messages
222
I am writing a software to display out 10 data at one time onto LCD TV before the next 10 data is replacing the earlier 10 records.

To do this, I am using a recordset to move at the back and recordset is moved next through 10 times of looping. Recordset is then bookmarked and linked back to screen before it is displayed out. You may need to see the attachment for further understanding.

However, if total records are 33, I do not understand why the last 3 data cannot be displayed out and through immediate windows tool, an error happen to the method Find. The output should display the last 3 data, however, the display has shown the first 10 data.

In summary,
0) 1st 10 data (display correctly)
1) 1st 10 data ---> 2nd 10 data (display correctly)
2) 2nd 10 data --> 3rd 10 data (display correctly)
3) 3rd 10 data --> 4th 3 data (Error has happened at here [if refer to attachment, not too sure what has gone wrong to the Find (Part 2) method]

Is anyone can help ?
 

Attachments

  • Form.png
    Form.png
    28.1 KB · Views: 41

JHB

Have been here a while
Local time
Today, 05:24
Joined
Jun 17, 2012
Messages
7,732
I think it is because you move beyond the data in the the first loop, where you have the EOF.
Move one record backwards - MovePrevious.
 

MarkK

bit cruncher
Local time
Yesterday, 20:24
Joined
Mar 17, 2004
Messages
8,180
Two questions:
1) what error are you getting?
2) what line of code causes it?
Mark
 

Orthodox Dave

Home Developer
Local time
Today, 04:24
Joined
Apr 13, 2017
Messages
218
Near the top of your attachment you have
Code:
rsTemp.MoveFirst
then later in your code you have
Code:
Set rsTemp = Me.RecordsetClone
soon followed by
Code:
rsTemp.MoveNext

You should MoveFirst after setting the recordset.

and there is no With statement. Perhaps try changing the sequence to:
Code:
Set rsTemp = Me.RecordsetClone
With rsTemp
.MoveFirst

For intLoopPage = 1 To 10
etc etc etc

then you'll need End With later.
 

Users who are viewing this thread

Top Bottom