I have built an Access form which has a subform (in Continuous Forms view) to display a list of records. I don't want there to be a horizontal scrollbar on the subform and would like to limit the number of records to 15 per page. The user can then click on a "Next" button and see records 15-30 and so on. My code is as follows;
Private Sub next_15_Click()
On Error GoTo Err_next_15_Click
DoCmd.GotoRecord , , acNext, 15
Exit_next_15_Click:
Exit Sub
Err_next_15_Click:
Resume Exit_next_15_Click
End Sub
This is only moving my records on one more (showing 2-16), and if I make the window smaller (to show 14 records), it moves it on to 17 onwards!? Can anybody explain why and point me in the right direction to solve this problem? Any help is greatly appreciated.
Many thanks in advance.
Private Sub next_15_Click()
On Error GoTo Err_next_15_Click
DoCmd.GotoRecord , , acNext, 15
Exit_next_15_Click:
Exit Sub
Err_next_15_Click:
Resume Exit_next_15_Click
End Sub
This is only moving my records on one more (showing 2-16), and if I make the window smaller (to show 14 records), it moves it on to 17 onwards!? Can anybody explain why and point me in the right direction to solve this problem? Any help is greatly appreciated.
Many thanks in advance.