Private Sub Command1_Click()
Dim db As Database
Dim tb As Recordset
Set db = OpenDatabase("D:\database\product.mdb")
strsql = "select * from product"
Set tb = db.OpenRecordset(strsql)
错误提示:类型不匹配,错误所在行为最后一行
...全文
1225打赏收藏
这段程序有什么错误
Private Sub Command1_Click() Dim db As Database Dim tb As Recordset Set db = OpenDatabase("D:\database\product.mdb") strsql = "select * from product" Set tb = db.OpenRecordset(strsql) 错误提示:类型不匹配,错误所在行为最后一行
Private Sub Command1_Click()
DIM SRTSQL AS STRING
Dim db As Database
Dim tb As Recordset
Set db = OpenDatabase("D:\database\product.mdb")
strsql = "select * from product"
Set tb = db.OpenRecordset(strsql)
这样就没问题了~