G
Guest
The code below removes the previous filter and finds the record in the main
form with DWG No. matches that selected in combo box cboDWGNo. But now
instead of just finding the record, I'd like the combo box to "filter" the
record. Any idea? Thanks
Extra info:
1) The main form is based on a query called qryDrawings.
2) The RowSource of cboDWGNo is also from the same query:
SELECT [qryDrawings].[DWGNo] FROM [qryDrawings]
Private Sub cboDWGNo_AfterUpdate()
' Remove previous filter.
Me.FilterOn = False
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[DWGNo] = '" & Me![cboDWGNo] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
form with DWG No. matches that selected in combo box cboDWGNo. But now
instead of just finding the record, I'd like the combo box to "filter" the
record. Any idea? Thanks
Extra info:
1) The main form is based on a query called qryDrawings.
2) The RowSource of cboDWGNo is also from the same query:
SELECT [qryDrawings].[DWGNo] FROM [qryDrawings]
Private Sub cboDWGNo_AfterUpdate()
' Remove previous filter.
Me.FilterOn = False
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[DWGNo] = '" & Me![cboDWGNo] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub