How do i populate datagrid from a recordset object
I need to populate a datagrid from this search criteriaDim cnSrch As
ADODB.Connection
Dim rsSrch As ADODB.Recordset
Set cnSrch = New ADODB.Connection
cnSrch.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & "Data Source = C:\BB\sh.mdb"
cnSrch.Open
Set rsSrch = New ADODB.Recordset
Dim findstr As String
findstr = "select * from PatientTab where CardType = '" & cboCardType & "'"
rsSrch.Open findstr, cnSrch, adOpenDynamic
Set DataGrid1.DataSource = rsSrch
DataGrid1.Refresh
|