If Combo2.Text = "1" Then sdate = str Adodc2.RecordSource = "select * from tblinput where Indate=#sdate#" DataGrid2.Visible = False Adodc2.Refresh Set DataGrid2.DataSource = Adodc2 DataGrid2.Refresh DataGrid2.Visible = True End If sdate是Date型变量 查询为何失败呢
这样还是不行啊,到底怎么回事?
sdate = str
Adodc2.RecordSource = "select * from tblinput where Indate=#sdate#"
DataGrid2.Visible = False
Adodc2.Refresh
Set DataGrid2.DataSource = Adodc2
DataGrid2.Refresh
DataGrid2.Visible = True
End If
sdate是Date型变量
查询为何失败呢