MackMan
Registered User.
- Local time
- Today, 15:02
- Joined
- Nov 25, 2014
- Messages
- 174
Firstly - Happy New Year to All!
My form layout is; Main form, with sub-form datasheet based on a query (I can't have a split form as this does not work for me)
I'm using the following code in the subforms Onclick event to display the corresponding sub-form record in the main-form...
Private Sub Form_Click()
Dim rst As DAO.Recordset
Set rst = Me.Parent.RecordsetClone
rst.FindFirst "TopLineID=" & Me.TopLineID
If Not rst.NoMatch Then
Me.Parent.Bookmark = rst.Bookmark
End If
End Sub
all works wonderfully except...
When I click on the sub-forms datasheet control, the sub-form loses focus on the clicked record, and returns to the very top record within the datasheet.
Is there a way I can retain focus on the datasheets record, so I can see which record I'm working on, both on the main form and subform?
I've missed something.
My form layout is; Main form, with sub-form datasheet based on a query (I can't have a split form as this does not work for me)
I'm using the following code in the subforms Onclick event to display the corresponding sub-form record in the main-form...
Private Sub Form_Click()
Dim rst As DAO.Recordset
Set rst = Me.Parent.RecordsetClone
rst.FindFirst "TopLineID=" & Me.TopLineID
If Not rst.NoMatch Then
Me.Parent.Bookmark = rst.Bookmark
End If
End Sub
all works wonderfully except...
When I click on the sub-forms datasheet control, the sub-form loses focus on the clicked record, and returns to the very top record within the datasheet.
Is there a way I can retain focus on the datasheets record, so I can see which record I'm working on, both on the main form and subform?
I've missed something.