Does anyone know if it is possible to have a form with 2 subforms, and to have the subforms both be able to be navigated by a single scroll bar on the main form?
I have a similar system where I have 3 subforms on a main form. One of the subforms has a listbox that when clicked synchronises the other two subforms by scrolling their records to make the visible. Is this the sort of thing you are looking for? if so read on.
the two slave subforms have sub called synchform which as follows:
Public Sub SynchForm(MetId As String)
On Error Resume Next
Me.RecordsetClone.FindFirst "[Met_Id] = " & MetId & ""
Me.RecordsetClone.MovePrevious
If Me.RecordsetClone.BOF = True Then
Me.RecordsetClone.MoveFirst
Else
Me.RecordsetClone.MovePrevious
End If
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
In my case Met_Id is the field that links the forms together.
The list box on the controlling subform as part of its on_click event calls this procedure for the other two subforms as so:
Private Sub LstMET_Click()
On Error Resume Next
Dim frm As Form
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.