One main scroll bar for mutiple forms (subforms) (1 Viewer)

stu_c

Registered User.
Local time
Today, 01:24
Joined
Sep 20, 2007
Messages
346
Hi all
I have a main form within that I have 2 subforms one under each other, I want to try and make it look like its all on one form so I have expanded them all to the correct size and removed the scroll bars from the subforms and left the main vertical scroll bar in place, the issue I have now is when I go onto a field within the subform the main scroll bar stops working, is there anyway to solve this?
 

arnelgp

error reading drive A:
Local time
Today, 08:24
Joined
May 7, 2009
Messages
12,011
im not sure, but if the subform's are not updateable, you can use a Union query
from the source of the two subforms. therefore making them as one and can be
displayed on a single subform.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:24
Joined
Feb 19, 2013
Messages
12,926
To be clear, you are trying to synchronise the scrolling of the two subforms so the records stay 'in line'?

Not sure how you could use the mainform scrollbar to do that - you would need to create your own scrollbar or use the active X control control (see microsoft forms 2.0 scrollbar)
 

stu_c

Registered User.
Local time
Today, 01:24
Joined
Sep 20, 2007
Messages
346
hi all
so basically I have the following
FrmFullDetails
SFRMStaffDetails
SFRMOfficeDetails

The sub forms are big enough so when you scroll down on the main form you can see it (no scroll bars within the subforms), problem I have when you click into a subform field you are unable to scroll up and own form the main form, is there a away to allow this to be the default scroll bar at all times?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:24
Joined
Feb 19, 2013
Messages
12,926
still don't get what the issue is although I'm guessing the main form is too tall to fit on the screen - but you can only scroll the form that has the focus, if a control on the subform has been selected, then that subform has the focus.

Only thing I can suggest is to redesign the main form so you don't need to scroll
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 20:24
Joined
May 21, 2018
Messages
4,763
I am not sure what you are asking. But for getting scroll information and control scroll bars here is some old Lebans code. May need update to 64 bit.
 

Attachments

  • noScrollbarExample.zip
    472.7 KB · Views: 32
  • SetGetScrollbarsVer7.zip
    151.4 KB · Views: 35

stu_c

Registered User.
Local time
Today, 01:24
Joined
Sep 20, 2007
Messages
346
Hi all
Was asked for a bit more clarification on what I meant so here goes,

I Have attached two Mockup databases to show you how it is now and how I would like it, please use your imagination with the second subform within the first

Mock1 - as you can see there would be 3 scroll bars one for each sub form, what I want to do is expand the two subforms big enough so they don't have any vertical scroll bars like shown in Mock2.

Mock2 - the only scroll bar visible is the main forms vertical, is all works fine scrolling using the mouse roller ball but as soon as I click into a subform I am unable to use the mouse ball and have to manually scroll up by dragging the scrollbar up to the top, unless I click back into the main form again is there a way to stop this?
 

Attachments

  • Mockup Databases.zip
    142.1 KB · Views: 28

CJ_London

Super Moderator
Staff member
Local time
Today, 01:24
Joined
Feb 19, 2013
Messages
12,926
there is a lot you can do to manage the real estate so you don't need scrolling at all - for example

1588841801901.png
 

arnelgp

error reading drive A:
Local time
Today, 08:24
Joined
May 7, 2009
Messages
12,011
check mockup2 database.
 

Attachments

  • Mockup Databases.zip
    147.5 KB · Views: 33

Users who are viewing this thread

Top Bottom