Results 1 to 4 of 4

Make my reports scroll when they are sub reports on my navigation form

  1. #1
    anthgav is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    75

    Make my reports scroll when they are sub reports on my navigation form

    Hi

    I'm trying to make my reports scroll with the mouse wheel when they are sub reports in the navigation form.



    If I add the following code to an individual report's VBA then it works on that report...
    Code:
    Private Sub Report_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
        Dim r As Long
        If Not Me.Dirty Then
            Do While r < Abs(Count)
                If (Count < 0) And (Me.CurrentRecord >= 1) Then
                    DoCmd.GoToRecord , , acPrevious, 1
                ElseIf (Count > 0) Then
                    DoCmd.GoToRecord , , acNext, 1
               End If
               r = r + 1
            Loop
        End If
    End Sub
    What object do I need to add this code to, to make it work with all reports and would I need to add it to a module instead to make it work for all reports?

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    6,853
    they dont usually mix.
    reports show in 1 window,
    subforms in a form.

    nobody puts reports in a form.

  3. #3
    anthgav is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    75
    I only have my reports within a navigation form under a tab called Reports, they are not a sub report under a normal form. I need everyone who uses access runtime to access the reports so I have put them on the navigation form, didn't think there was anything wrong with this. Either way is what I want possible or do I have to paste the code in every individual report?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    45,155
    I tried to build generic code in general module that can be called by the MouseWheel event. Easier just to copy/paste into each report. MouseWheel event must be in each report anyway.
    To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 09-12-2017, 10:12 PM
  2. Replies: 5
    Last Post: 12-01-2016, 01:22 PM
  3. Scroll not working in viewing reports
    By data808 in forum Reports
    Replies: 2
    Last Post: 04-20-2014, 02:35 AM
  4. Replies: 0
    Last Post: 12-05-2013, 12:54 PM
  5. Reports with Date Range in Navigation Form
    By crix_17 in forum Reports
    Replies: 0
    Last Post: 08-07-2013, 04:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums