Mouse / cursor issue (1 Viewer)

munkeyroot

Registered User.
Local time
Today, 20:46
Joined
Jan 13, 2011
Messages
76
Hi every one

not sure if this is possible, however id like to put this to you guys to see.

Ok, so i have a main form with a subform.

if i click on or use the subform that's ok but lets say the subform is a way down the bottom of the page and i need to scroll to the top of the form to look at other data using the Mouse Wheel, at this point it only scrolls the subform. i have to use the main forms scroll bar and move it up to view the above content.

the only way i can see to do this is to find a nearby main form text box and click they then the main form is selected again to use the mouse wheel and scroll up.

so my question is How do i click out of a subform on any blank area without i have to find a text box on the main form for me to mouse scroll.


anythoughts

cheers munk?
 

isladogs

MVP / VIP
Local time
Today, 20:46
Joined
Jan 14, 2017
Messages
18,275
You could do one of these

1.add a button on the subform which sets the focus to a control at the top of the main form & then do a form refresh

2. Modify the main form layout so the subform is on the right side of the main form controls instead of below them. Obviously ensure the new layout doesn't require horizontal scrolling instead!
 
Last edited:

static

Registered User.
Local time
Today, 20:46
Joined
Nov 2, 2015
Messages
823
Code:
Private Type point
    x As Single
    y As Single
End Type
Dim p As point

Private Sub MySubForm1_Enter() ' <== change to name of your subform
    'store current scrollbar values when subform gets focus
    p.x = CurrentSectionLeft
    p.y = CurrentSectionTop
End Sub

Private Sub Detail_Click()
    Me(0).SetFocus 'set focus to any control
    DoCmd.GoToPage 1, -p.x, -p.y 'restore scroll pos
End Sub
 

missinglinq

AWF VIP
Local time
Today, 15:46
Joined
Jun 20, 2003
Messages
6,420
As to the "anythoughts," munk, having a Form that is so long that users need to scroll, to view it in its entirety, is one of the most user-unfriendly things a developer can do! You probably should rethink your Main Form design, possibly utilizing Tabbed Pages. How many Controls does your Main Form hold?

Linq ;0)>
 

Users who are viewing this thread

Top Bottom