hi,

i have a datagrid and i am trying to search for certain records by means of a combobox. i seem to be going about it all wrong. this is the code i have to date

Private Sub searchid_Click()
Dim selected As String

If searchid.Caption = "Search By Cabinet Id" Then

selected = Combodateselect.Text

Adocosts.Recordset.Filter = "[Cabinet Id] > " & selected
searchid.Caption = "Cancel"

Else
DTservice1.Value = Date
Adocosts.Refresh
dbgservicecosts.Refresh
searchid.Caption = "Search By Cabinet Id"
End If
End Sub

can anyone help me with this thanks