1个回答
展开全部
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from etzlb where mqxm='" & Text1 & "'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\xt1.mdb;Persist Security Info=False"
End Sub
数据库,表名,字段名等改成你自己。
Adodc1.RecordSource = "select * from etzlb where mqxm='" & Text1 & "'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\xt1.mdb;Persist Security Info=False"
End Sub
数据库,表名,字段名等改成你自己。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询