Solved

scrolling in an access form with subforms

Posted on 2013-12-18
5
1,036 Views
Last Modified: 2016-09-19
i have a form with 2 subforms that is usually a bit longer than the page.

when the main form is active, my users can use the wheel on the mouse to scroll the page.

however when the subforms are active (when entering the info on the subforms) the mouse wheel scrolls the subform.

Is there a way, maybe some vba code or something that makes it so that the main form is always active. So in other words even when people are entering info on the subform, when the mouse wheel is moved the one who scrolls is the main form not the subform?

I know its a long shot, but thanks
0
Comment
Question by:damixa
  • 2
  • 2
5 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
Comment Utility
What version of Access are you using?

Access 2007 has a On Mouse Wheel event associated with forms that you might be able to use to set the focus back to the main form, when the user scrolls the mouse.  

But this would only really be a good idea if the subform is not a continuous form.

Instead, you might consider sizing your forms not to exceed the size of your screen, and using a tab control for your subforms.
0
 

Author Closing Comment

by:damixa
Comment Utility
Perfect, I did that and it worked.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
did which?  Used the MouseWheel event or placed your subforms on tab controls?
0
 

Author Comment

by:damixa
Comment Utility
Did the Mousewheel event.
0
 

Expert Comment

by:Dalton L
Comment Utility
What VBA code did you use to allow this to work? I tried setting focus, but that is not working for me...
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

763 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

15 Experts available now in Live!

Get 1:1 Help Now