Solved Problem scrolling on form with a tab control (1 Viewer)

AlliCarr

New member
Local time
Today, 22:32
Joined
Feb 19, 2024
Messages
26
Hi all,

I'm hoping you can help.

I have recently updated one of the forms in my database which has a tab control. Within 3 of those tabs I have subforms, one of which I have just added as part of the update.

The tab control is quite high so usually you have to scroll down with the mouse wheel to see the controls on some of the tabs. That's fine but my problem is that, now I've added the new subform to a tab which didn't have one previously, I can't scroll down using the mouse on just that tab. All other tabs are fine, even the others with subforms.

I've attached a copy of the database and it's the "GrantsF" form that's the problem. The Impact tab is the one that won't scroll. (the outcomes information is the sub form).

Please let me know if you need any clarification.
Kind regards
Allison
 

Attachments

  • TestDB.zip
    5.7 MB · Views: 45

June7

AWF VIP
Local time
Today, 13:32
Joined
Mar 9, 2014
Messages
5,497
Could improve indentation of code to make it more readable.

I don't get main form scroll wheel functionality on any tab that has a subform. Subform scroll works. I get this same behavior in my db. Afraid this is normal.
 

bob fitz

AWF VIP
Local time
Today, 22:32
Joined
May 23, 2011
Messages
4,727
Hi all,

I'm hoping you can help.

I have recently updated one of the forms in my database which has a tab control. Within 3 of those tabs I have subforms, one of which I have just added as part of the update.

The tab control is quite high so usually you have to scroll down with the mouse wheel to see the controls on some of the tabs. That's fine but my problem is that, now I've added the new subform to a tab which didn't have one previously, I can't scroll down using the mouse on just that tab. All other tabs are fine, even the others with subforms.

I've attached a copy of the database and it's the "GrantsF" form that's the problem. The Impact tab is the one that won't scroll. (the outcomes information is the sub form).

Please let me know if you need any clarification.
Kind regards
Allison
Try the attached file.
 

Attachments

  • TestD Bob01.zip
    3.6 MB · Views: 36

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:32
Joined
May 7, 2009
Messages
19,246
if there is 1-1 relationship between GrantT and GrantOutcomesT table, you can create a query (GrantQ) that joins these 2 tables.
and use the query as Recordsource of your Form.
now you can eliminate the subform and just add those fields from (of GrantOutcomesT) from the query.
i also added index (unique) on field GrantURN of GrantOutcomesT.
on the main form Current event i constantly add GrantURN to table GrantOutcomesT and also on the Click event of GrantImpact, tab button.
not fully tested, but if there are errors accessing the GrantOutcomesF (subform) on your code, you should totally remove them.
 

Attachments

  • TestD agp.zip
    4 MB · Views: 39

bob fitz

AWF VIP
Local time
Today, 22:32
Joined
May 23, 2011
Messages
4,727
Can you explain how you did it?
thanks.
I created a textbox, Named txt1 and set its Height, Width and Top properties, all to 0. Set its Locked property to Yes.
In the Change event of TabCtl257:
Code:
Me.txt1.SetFocus
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:32
Joined
May 7, 2009
Messages
19,246
I created a textbox, Named txt1 and set its Height, Width and Top properties, all to 0. Set its Locked property to Yes.
In the Change event of TabCtl257
did you test when the Mouse is Over the subform, it wont scroll?
with my proposal, with or without textbox, txt, it will scroll.
 
Last edited:

AlliCarr

New member
Local time
Today, 22:32
Joined
Feb 19, 2024
Messages
26
did you test when the Mouse is Over the subform, it wont scroll?
with my proposal, with or without textbox, txt, it will scroll.
I've amended the format of the form slightly so the subform is smaller and, yes, when you're on the subform it doesn't scroll the main form but I can easily manage that with the staff who will be using it. I did try your solution but when I tried adding new records in the GrantsF form they didn't appear in the GrantsT table so it wouldn't have quite worked for me.
 

Users who are viewing this thread

Top Bottom