Substitue Scroll Bars in Continuous form (1 Viewer)

spacepro

Registered User.
Local time
Today, 02:56
Joined
Jan 13, 2003
Messages
715
Hi All,

I have a Continuous form which displays about 5 records at a time, due to multi-function forms that need to be displayed. Basically I want to hide the scroll bars and show 2 text links that say 'Next 5' and 'Prev 5' and to display an image to say end of recordset when reached the last record.

I suppose I could do this by cycling through the recordset, but just wondering if anyone had any thoughts and the best way to achieve this.
I can control the form so that it cannot be resizable , just need to control and mimic what the scroll bars do by showing 5 records at a time, a bit like page up and page down function keys.

I need to visibily show the user that there are more records than the ones on the screen.

Many Thanks in advance.

Andy
 

llkhoutx

Registered User.
Local time
Yesterday, 20:56
Joined
Feb 26, 2001
Messages
4,018
Use a form recordsetclone to determine and set a bookmark at + or - 5 records. However, you have to check and modify your code for being less than 5 from the top or bottom, that is, you can't always move five records.
 

WindSailor

Registered User.
Local time
Yesterday, 18:56
Joined
Oct 29, 2003
Messages
239
Or if you simply want to scroll through a grid etc. with the form set to a certain size use "GoToPage" on your command buttons and assign your x and y coordinates on your form.
 
Last edited:

GabrielR

Registered User.
Local time
Yesterday, 21:56
Joined
Oct 6, 2004
Messages
63
I use this on my continuous forms in the "on Current" Event:

Code:
Private Sub Form_Current()

    If Me.RecordsetClone.RecordCount > 4 Then
        Me.ScrollBars = 2
    Else
        Me.ScrollBars = 0
    End If
End Sub

that will hide the scroll bars and show them when a number of records (in this case 4) are present...

Maybe you can adapt it the way you wanted.

This code is not mine.

Gabriel
 

spacepro

Registered User.
Local time
Today, 02:56
Joined
Jan 13, 2003
Messages
715
Hi Everyone,

Thanks for all of your suggestions. In the end I decided to substitue the navigation buttons with my own using [currentrecord] and count(*). Making the number of records highly visible.

Appreciate everyone's comments.

Thanks to all

Andy
 

Users who are viewing this thread

Top Bottom