Sync Scrolling on two datasheets (1 Viewer)

Snowflake68

Registered User.
Local time
Today, 17:20
Joined
May 28, 2014
Messages
452
I have two datasheets on a tabbed navigation form which I would like to synchronise horizontal scrolling. Not sure where to start or how to go about this or if its even possible.

Each form is bound to separate tables with 18 columns (RA, RB up to RR, one for each type of Box) that contain quantities entered by the user. One form is the quantity of items in each pack and the second is the quantity of packs in each type of box.

So each of the 18 columns is related to a column in the other table so when they scroll across on one form to enter the quantities then other form needs to scroll so that the columns remain beneath its related column.

Appreciate any ideas please.

Attached screenshot
 

Attachments

  • Sync Scrolling Example.jpg
    Sync Scrolling Example.jpg
    87.9 KB · Views: 107

Snowflake68

Registered User.
Local time
Today, 17:20
Joined
May 28, 2014
Messages
452
Have a look at my SyncScrollbars Example, I think that might help.

thanks for this. It all looks very complicated for a novice like me but I will try to figure out how it works to see if I can incorporate it into my application. It might be difficult as I have my two forms as sub forms on a Navigation subform which arent the easiest things to code.
 

Micron

AWF VIP
Local time
Today, 12:20
Joined
Oct 20, 2018
Messages
3,478
can't see anything of the top of your form in the pic but can say this: if it is really a navigation form then it can only load one "sub" form at a time. When you switch tabs, active form closes, subform on other tab opens. There is no way to synchronize anything between 2 such forms because only 1 at a time is loaded.
 

missinglinq

AWF VIP
Local time
Today, 12:20
Joined
Jun 20, 2003
Messages
6,423
...

It all looks very complicated for a novice like me ...
Doing this kind of thing is always going to be complicated...there's no getting around that!

Don't quite follow your scenario, here, but to be honest...your data scheme seems flawed...appearing much more like a spreadsheet than a database.

Linq ;0)>
 

Snowflake68

Registered User.
Local time
Today, 17:20
Joined
May 28, 2014
Messages
452
Doing this kind of thing is always going to be complicated...there's no getting around that!

Don't quite follow your scenario, here, but to be honest...your data scheme seems flawed...appearing much more like a spreadsheet than a database.

Linq ;0)>

This is how the end user has requested it so who am I to say otherwise. I gave them the option of how it could look and because their users are used to spreadsheets this is how they requested it.
 

Snowflake68

Registered User.
Local time
Today, 17:20
Joined
May 28, 2014
Messages
452
can't see anything of the top of your form in the pic but can say this: if it is really a navigation form then it can only load one "sub" form at a time. When you switch tabs, active form closes, subform on other tab opens. There is no way to synchronize anything between 2 such forms because only 1 at a time is loaded.

Yes it is really a navigation form which yes I wish I didn't use but I am stuck with it now.

I wont bother with attempting synchronising the scroll bars now, the end user will just have to put up with it. Thanks for saving me a lot of wasted time.
 

isladogs

MVP / VIP
Local time
Today, 17:20
Joined
Jan 14, 2017
Messages
18,219
Reading the comments on Sonic8‘s website, you should be able to just import his reusable class module code in your project without any changes (if you have 32-bit Access)
 

sonic8

AWF VIP
Local time
Today, 18:20
Joined
Oct 27, 2015
Messages
998
Reading the comments on Sonic8‘s website, you should be able to just import his reusable class module code in your project without any changes (if you have 32-bit Access)
Thank you isladogs, I should document that more clearly.
In fact, anyone using the component (class module) would need to add 4 lines of code to his/her form, which can be copied and adapted from the sample application.
 

isladogs

MVP / VIP
Local time
Today, 17:20
Joined
Jan 14, 2017
Messages
18,219
Well I haven't tried your code but personally think 4 lines of code counts as no effort required by the user.
 

Snowflake68

Registered User.
Local time
Today, 17:20
Joined
May 28, 2014
Messages
452
Well I haven't tried your code but personally think 4 lines of code counts as no effort required by the user.

If I could have worked out myself that I only needed 4 lines of code then I might have tried it. The sample application looked a little overwhelming to a novice like me to wasn't going to attempt it especially as I am using a navigation form which in hindsight probably wasnt the best solution given that it only allows one subform to be used at one time.

I may attempt to try it in another application though just as a proof of concept so not given up on it just yet.

Thanks
 

Micron

AWF VIP
Local time
Today, 12:20
Joined
Oct 20, 2018
Messages
3,478
try tab control on a normal form with each page holding one form?
 

isladogs

MVP / VIP
Local time
Today, 17:20
Joined
Jan 14, 2017
Messages
18,219
No problems.
Sounds like the sync forms code is like my automatic form resizing module code. The code itself may be complex but very easy to use.
 

Users who are viewing this thread

Top Bottom