E
Eric
Hi,
This isn't exact code, but it's basically what should be
done:
-------------------------
Dim rstTemp, rstTemp1 As Recordset
Dim sqlTemp As String
rstTemp = Forms!MainForm.RecordsetClone
rstTemp.Move Forms!MainForm.Bookmark
rstTemp.MovePrevious
sqlTemp = "SELECT * FROM SUBTABLE WHERE FOREIGN_KEY = "
& rstTemp!primaryKey
Set rstemp1 = CurrentDb.OpenRecordset(sqlTemp)
If rstTemp1.RecordCount > 0 Then
rstTemp1.MoveFirst
txtField1 = rstTemp!field1
txtField2 = rstTemp!field2
'ETC, ETC, ETC
End If
rstTemp.Close
rstTemp1.Close
------------------------------
Like I said, some of the syntax will have to be fixed, but
it should be accurate enough for you to understand.
I hope this helps.
Regards,
Eric
This isn't exact code, but it's basically what should be
done:
-------------------------
Dim rstTemp, rstTemp1 As Recordset
Dim sqlTemp As String
rstTemp = Forms!MainForm.RecordsetClone
rstTemp.Move Forms!MainForm.Bookmark
rstTemp.MovePrevious
sqlTemp = "SELECT * FROM SUBTABLE WHERE FOREIGN_KEY = "
& rstTemp!primaryKey
Set rstemp1 = CurrentDb.OpenRecordset(sqlTemp)
If rstTemp1.RecordCount > 0 Then
rstTemp1.MoveFirst
txtField1 = rstTemp!field1
txtField2 = rstTemp!field2
'ETC, ETC, ETC
End If
rstTemp.Close
rstTemp1.Close
------------------------------
Like I said, some of the syntax will have to be fixed, but
it should be accurate enough for you to understand.
I hope this helps.
Regards,
Eric