Filter sub from using combo on parent form

  • Thread starter Thread starter Manuel
  • Start date Start date
M

Manuel

Hi,

I have a combo box on my form (in the header) and I want to be able to
filter data on my sub form based on selection I make in the combo box. In
the After Update event of the combo box I have the following code:

Private Sub Combo7_AfterUpdate()
Dim rs As Object

'The code bombs at the next line: Method or Member not found.
Set rs = Me.sfrmPayoffs.RecordsetClone
rs.FindFirst "WeekOf = '" & Me.Combo7 & "'"

Me!sfrmPayoffs.Bookmark = rs.Bookmark

End Sub

Help!
 
Manuel said:
I have a combo box on my form (in the header) and I want to be able to
filter data on my sub form based on selection I make in the combo box. In
the After Update event of the combo box I have the following code:

Private Sub Combo7_AfterUpdate()
Dim rs As Object

'The code bombs at the next line: Method or Member not found.
Set rs = Me.sfrmPayoffs.RecordsetClone
rs.FindFirst "WeekOf = '" & Me.Combo7 & "'"

Me!sfrmPayoffs.Bookmark = rs.Bookmark

End Sub


With Me.sfrmPayoffs.FORM.RecordsetClone
.FindFirst "WeekOf = '" & Me.Combo7 & "'"
If Not .NoMatch Then Me!sfrmPayoffs.FORM.Bookmark =
..Bookmark
End With
 
Back
Top