i have a datagrid and ADODC whose prperties are set at designtime . And runs well i need to display specific records in the grid for today's date on click of command box named activeorders. i put this code and when i run it grid comes blank . any solution
Private Sub activeorders_Cl ick()
Dim cn As New ADODB.Connectio n
Dim rs As Recordset
cn.Open ("DSN=northwind ")
Set rs = cn.Execute("sel ect * from tblreceivedorde rs where pickupdate = cvdate('" & Date & "')")
' i need records for today's date in grid
Set Adodc2.Recordse t = rs
Adodc2.Refresh
DataGrid2.Refre sh
End Sub
Private Sub activeorders_Cl ick()
Dim cn As New ADODB.Connectio n
Dim rs As Recordset
cn.Open ("DSN=northwind ")
Set rs = cn.Execute("sel ect * from tblreceivedorde rs where pickupdate = cvdate('" & Date & "')")
' i need records for today's date in grid
Set Adodc2.Recordse t = rs
Adodc2.Refresh
DataGrid2.Refre sh
End Sub
Comment