Basically my subform is a glorified list box. I'd like to be able to select a record on it to display all of the relevant data on the main form. Subform is based on a much smaller query, but same data as main form.
Parent / Child relationships don't work because main form filters the subform (Need it to be the other way around).
I've tried this:
But I get run-time error 3021 - No current record.
When stepping trough the code there is a current record, and I know there is a matching record on main form.
Anyone know what's going on?
Parent / Child relationships don't work because main form filters the subform (Need it to be the other way around).
I've tried this:
Code:
Private Sub Form_Current()
If Not Me.NewRecord Then
Me.Parent.Recordset.FindFirst "ID = " & Me.Recordset.Fields("ID")
If Not Me.Parent.Recordset.NoMatch Then
Me.Parent.Bookmark = Me.Parent.Recordset.Bookmark
End If
End If
End Sub
But I get run-time error 3021 - No current record.
When stepping trough the code there is a current record, and I know there is a matching record on main form.
Anyone know what's going on?