G
GLT
Hi,
I had this working perfectly a while ago, and I've made some change and now
its not working. After my mainform went to the same record as my unbound
subform, my subform would stay on its selected record. Now it goes way back
to the 1st record, very annoying for a list thats 300 records long.
Can anyone advise how to fix this?
Cheers,
Sub Form_Click()
Dim rs As DAO.Recordset
If Me.Parent.Dirty Then
Me.Parent.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
Set rs1 = Me.Parent.RecordsetClone
rs.FindFirst "[RecID] = '" & Me.RecID & "'"
rs1.FindFirst "[RecID] = '" & Me.RecID & "'"
If Not rs.NoMatch Then
Me.Parent.Bookmark = rs1.Bookmark 'reposition the form
Me.Parent![ServerList].Requery
Me.Bookmark = rs.Bookmark
Me.Requery
End If
Set rs = Nothing
Set rs1 = Nothing
End Sub
I had this working perfectly a while ago, and I've made some change and now
its not working. After my mainform went to the same record as my unbound
subform, my subform would stay on its selected record. Now it goes way back
to the 1st record, very annoying for a list thats 300 records long.
Can anyone advise how to fix this?
Cheers,
Sub Form_Click()
Dim rs As DAO.Recordset
If Me.Parent.Dirty Then
Me.Parent.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
Set rs1 = Me.Parent.RecordsetClone
rs.FindFirst "[RecID] = '" & Me.RecID & "'"
rs1.FindFirst "[RecID] = '" & Me.RecID & "'"
If Not rs.NoMatch Then
Me.Parent.Bookmark = rs1.Bookmark 'reposition the form
Me.Parent![ServerList].Requery
Me.Bookmark = rs.Bookmark
Me.Requery
End If
Set rs = Nothing
Set rs1 = Nothing
End Sub