主题:VB对Access表的查询~急急急
我想实现在text1中输入数据,按command1后可以根据text1中的内容输出该行的其他内容,用到的插件有adodc和DataGrid代码有
Private Sub Form_Load()
Text1 = ""
With Adodc1
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\桌面\Database~~练习\实例2\实例2.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from SYS"
Adodc1.Refresh
DataGrid1.Refresh
End With
End Sub
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from SYS where=Text1.Text" '就是这里不知到为什么会错
Adodc1.Refresh
DataGrid1.Refresh
End Sub
希望各位帮帮忙~~感激不尽
Private Sub Form_Load()
Text1 = ""
With Adodc1
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\桌面\Database~~练习\实例2\实例2.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from SYS"
Adodc1.Refresh
DataGrid1.Refresh
End With
End Sub
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from SYS where=Text1.Text" '就是这里不知到为什么会错
Adodc1.Refresh
DataGrid1.Refresh
End Sub
希望各位帮帮忙~~感激不尽