Solved Problem scrolling on form with a tab control

AlliCarr

Member
Local time
Today, 10:03
Joined
Feb 19, 2024
Messages
42
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

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.
 
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

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

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
 
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:
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

Back
Top Bottom