Synchronizing 2 subforms on a main form

G

Guest

Hello, I have a problem I cannot resolve. I have a Main form called frmMain
and on it are two subforms, frmSub1 and frmSub2. The first subform, frmSub1,
is a continuous form that looks like a datasheet. As you click on a
different record, the second subform, frmSub2 (which is a form that displays
the details of the single record selected in the first subform), changes to
show the details of the record selected in the first subform. My problem is,
as I scroll down the first subform, the second subform does not update until
I physically click on a different record. What I want to have happen is, as
I scroll down the first subform, I want the second subform to update to match
the top record in the first subform. IIs it possible to make the scrolling
up or down update my secod subform? PLEASE let me know...Thank you.
 
M

Marshall Barton

MikeP125 said:
Hello, I have a problem I cannot resolve. I have a Main form called frmMain
and on it are two subforms, frmSub1 and frmSub2. The first subform, frmSub1,
is a continuous form that looks like a datasheet. As you click on a
different record, the second subform, frmSub2 (which is a form that displays
the details of the single record selected in the first subform), changes to
show the details of the record selected in the first subform. My problem is,
as I scroll down the first subform, the second subform does not update until
I physically click on a different record. What I want to have happen is, as
I scroll down the first subform, I want the second subform to update to match
the top record in the first subform. IIs it possible to make the scrolling
up or down update my secod subform?


If it is possible, you would need something like the
SetGetSB (or ?) sample db at www.lebans.com
 
G

Guest

I have checked out the webste, it is similar to my situation but still
diferent because i have multiple subforms with one scroll bar in one subform
changing the record in the second subform and this website does not address
this. If you have any other thoughts, please let me know.
Thanks,
Mike
 
M

Marshall Barton

If you are looking to get multiple subforms to scroll as you
use the scroll bar in one of them, that won't happen without
inventing some pretty tricky code that hooks into the scroll
bar mechanism (and I don't have any idea how to do that).

OTOH, If you create some other mechanism to coordinate the
other form's scrolling, it may not be too bad. One thing
that comes to mind is to replace the scroll bar with a
mainform control such as a rectangle, then use its mouse
down, move and up event to simulate a scroll bar and
coordinate the subforms.

Not nearly as smooth, but a lot simpler would be require a
click in a record after scrolling. This would allow you to
use Stephen's example in the Current event to copy the
SelTop value from the first subform to the other subforms.
 
G

Guest

I will try it. Thank you again for your help, I appreciate it.

Marshall Barton said:
If you are looking to get multiple subforms to scroll as you
use the scroll bar in one of them, that won't happen without
inventing some pretty tricky code that hooks into the scroll
bar mechanism (and I don't have any idea how to do that).

OTOH, If you create some other mechanism to coordinate the
other form's scrolling, it may not be too bad. One thing
that comes to mind is to replace the scroll bar with a
mainform control such as a rectangle, then use its mouse
down, move and up event to simulate a scroll bar and
coordinate the subforms.

Not nearly as smooth, but a lot simpler would be require a
click in a record after scrolling. This would allow you to
use Stephen's example in the Current event to copy the
SelTop value from the first subform to the other subforms.
--
Marsh
MVP [MS Access]

I have checked out the webste, it is similar to my situation but still
diferent because i have multiple subforms with one scroll bar in one subform
changing the record in the second subform and this website does not address
this. If you have any other thoughts, please let me know.
Thanks,
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Requery a subform 2
Multiple subforms 0
Access Main form/Subform Navigation 0
problem pass values in form to subform to subform 1
1 Main for 2 Subforms 15
Multiple Sub form Problem 2
Subforms 1
Switch between subforms using a button 1

Top