M
msmuzila
I know how to navigate to a form and a subform from a different form,
but i dont know how to do it when the form and subform is on the form
with the control (making the form and subform a subform and
sub-subform). Here is the code for the first way, can someone show me
how to modify it to do it the second way. I know the Docmd needs to go,
but i dont know how to make frmAdd_Disk into a subform and the frmDisk
into a sub-subform.
Private Sub List4_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
Dim rs As Object
stDocName = "frmAdd_Disk"
stLinkCriteria = "[Software ID]=" & Me![List0]
DoCmd.OpenForm stDocName
Set rs = Forms(stDocName).Recordset.Clone
rs.FindFirst stLinkCriteria
If Not rs.EOF Then Forms(stDocName).Bookmark = rs.Bookmark
Set frm = Forms("frmAdd_Disk").[frmDisk].Form
With frm.RecordsetClone
.FindFirst "Disk ID = " & Me![List1]
If .NoMatch Then
MsgBox "Not found in subform"
Else
frm.Bookmark = .Bookmark
End If
End With
Set frm = Nothing
End Sub
Many thanks
but i dont know how to do it when the form and subform is on the form
with the control (making the form and subform a subform and
sub-subform). Here is the code for the first way, can someone show me
how to modify it to do it the second way. I know the Docmd needs to go,
but i dont know how to make frmAdd_Disk into a subform and the frmDisk
into a sub-subform.
Private Sub List4_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
Dim rs As Object
stDocName = "frmAdd_Disk"
stLinkCriteria = "[Software ID]=" & Me![List0]
DoCmd.OpenForm stDocName
Set rs = Forms(stDocName).Recordset.Clone
rs.FindFirst stLinkCriteria
If Not rs.EOF Then Forms(stDocName).Bookmark = rs.Bookmark
Set frm = Forms("frmAdd_Disk").[frmDisk].Form
With frm.RecordsetClone
.FindFirst "Disk ID = " & Me![List1]
If .NoMatch Then
MsgBox "Not found in subform"
Else
frm.Bookmark = .Bookmark
End If
End With
Set frm = Nothing
End Sub
Many thanks