求帮助 Adodc.RecordSourcE 问题
Private Sub Command2_Click()
Set DataGrid2.DataSource = Nothing
Adodc2.ConnectionString = strcn
Adodc2.RecordSource = "select*from 物料表 where 物料编号=" & Val(Text1.Text) & ""
If Text1.Text = "" Or Adodc2.RecordSource = "" Then
MsgBox "请重新输入物料编号"
Adodc2.Refresh
Else
DataGrid2.Refresh
'datagrid绑定ado
Set DataGrid2.DataSource = Adodc2
DataGrid2.ReBind
Call iniDgBt '初始化datagrid的表头
End If
End Sub