Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1732
  • Last Modified:

scrolling in an access form with subforms

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
damixa
Asked:
damixa
  • 2
  • 2
1 Solution
 
Dale FyeCommented:
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
 
damixaAuthor Commented:
Perfect, I did that and it worked.
0
 
Dale FyeCommented:
did which?  Used the MouseWheel event or placed your subforms on tab controls?
0
 
damixaAuthor Commented:
Did the Mousewheel event.
0
 
Dalton LCommented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now