asifbhura
04-14-2004, 11:48 PM
hI everyone
Using Ms access
I want to display records in datagrid where records must be in selected date by combobox
i tried it like given code
but it displays only selected of second combobox
private sub commnad1_click
Dim myDate1 As Date
Dim myDate2 As Date
Dim sSQL As String
myDate1 = CDate(Combo2.Text)
myDate2 = CDate(Combo3.Text)
sSQL = "SELECT * FROM costtable WHERE [Date] BETWEEN #" & myDate1 & "# AND #" & myDate2 & "#"
rs2.Open sSQL, cn, adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = rs2
DataGrid1.Refresh
using this query it displays records in datagrid which selected by combo3
i want all records between selected two date.
Please help me its kind urgent
Waiting and hoping for favorable reply.
Thanx a lot
Using Ms access
I want to display records in datagrid where records must be in selected date by combobox
i tried it like given code
but it displays only selected of second combobox
private sub commnad1_click
Dim myDate1 As Date
Dim myDate2 As Date
Dim sSQL As String
myDate1 = CDate(Combo2.Text)
myDate2 = CDate(Combo3.Text)
sSQL = "SELECT * FROM costtable WHERE [Date] BETWEEN #" & myDate1 & "# AND #" & myDate2 & "#"
rs2.Open sSQL, cn, adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = rs2
DataGrid1.Refresh
using this query it displays records in datagrid which selected by combo3
i want all records between selected two date.
Please help me its kind urgent
Waiting and hoping for favorable reply.
Thanx a lot