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
Printable View
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
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.