|
-
Jun 5th, 2003, 08:50 AM
#1
Thread Starter
New Member
Filter DATAGRID?? how?
ok i done a datagrid with adodc ...
so i have a combobox to choose a name then click "ok"
later i want the combobox = name .....so it will show in the data grid with the name that choosen..
I'm newbie ..help fast
-
Jun 5th, 2003, 10:41 AM
#2
Member
Here ya go!!!
VB CODE----------------------------------------------------------------
Private Sub cmdOK_Click()
If Adodc1.Recordset.EOF = False And Len(cboYourCombo.Text) Then
Adodc1.Recordset.Filter = "YourField Like '" & cboYourCombo.Text & "'"
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "sorry no match found, try again!!", vbExclamation
Adodc1.Refresh
cboYourCombo.SetFocus
End If
End If
DataGrid1.Refresh
End Sub
END CODE_______________________________________
This should work..Let me know if any explaination is needed.
Last edited by Fleck; Jun 5th, 2003 at 01:25 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|