Filter sub from using combo on parent form

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!
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top