Solved

Access scroll bar arrows step through records

Posted on 2014-10-15
2
244 Views
Last Modified: 2014-10-19
I have a sub-form that is set to continuous form, vertical scroll only. I would like to be able to click the scroll bar up/down arrows to step from record to record. Is this possible? Thanks for any help in advance.
0
Comment
Question by:mickferrari
2 Comments
 
LVL 30

Accepted Solution

by:
hnasr earned 500 total points
ID: 40383412
Not sure about that in form scroll bars.

But you may mimic the action by adding two command buttons to the form, one named cmdNext in Form Header, and another named cmdPrevious in form Footer.

Private Sub cmdNext_Click()
    DoCmd.GoToRecord acDataForm, Me.Name, acNext
End Sub

Private Sub cmdPrevious_Click()
    DoCmd.GoToRecord acDataForm, Me.Name, acPrevious
End Sub

Open in new window

0
 

Author Comment

by:mickferrari
ID: 40390891
Hello hnasr,

That is a good work around for what i was after however I found a simple way to fix my problem. To get the scroll bar directional arrows to step through records the subform has to be the correct size, in other words the subform should have exactly the right height to fit one record. By doing this access allows you to step through each record using the scroll bar arrow buttons. It's not exactly what I wanted but will work well enough.

I'll accept your answer as the solution because it is an effective and simple work around for this problem, especially if you need a subform to be taller or shorter than what access will accept to allow record stepping using the scroll bar arrow keys.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now