Link to home
Start Free TrialLog in
Avatar of ouestque
ouestqueFlag for United States of America

asked on

AccessVB: Moving scrollbar of subform using vb

I have 2 subforms that are exactly the same size and that look at the same table. (They are titled: "Subform1" and "Subform2")

What VB code would I use so that when I press a button, it looks at the scrollbar on "Subform1" and moves the scrollbar to the exact same location on "Subform2".
ASKER CERTIFIED SOLUTION
Avatar of coffeeshop
coffeeshop
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ouestque

ASKER

Thanks Coffeeshop, this will make both subforms set to the same record, but sometimes the record will appear on the top in one subform2 and in another location in another subform1.

i.e.( if you select record 2 in subform1, then select record 5000 in subform2, they are both focused on the same record, but subform2 is showing the selected record at the top, while subform1 is showing the record in the middle of my subform.)

My theory is that it refreshes the record in subform 2 to the top, because the user had to scroll down to choose that record.

Is there a way to make them both appear in the same location. (i.e. reason for adjusting scrollbar.)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Holy Moly! I took a look at the German version of the code and it is very scattered and hard to understand. It appears to work on the German guy's program. It will be tough to adapt that to my forms...
Does anyone know if this is the simplist way to achieve what I am doing?