求助:下面的代码问题出在哪里?
Private Sub cmd组内编号_Click()Dim mydb As Database
Dim myrs As Recordset
Dim sql As String
Set mydb = Workspaces(0).OpenDatabase(App.Path & "\ldc2008.mdb")
sql = "select * from 户主信息 where 组编号= " & Trim(Text7.Text) & ""
Set myrs = mydb.OpenRecordset(sql, dbOpenDynaset)
Text4.Text = 1 + myrs.RecordCount
End Sub
当代码运行至“Set myrs = mydb.OpenRecordset(sql, dbOpenDynaset)”时,出现出错消息“标准表达式中数据类型不匹配”,应该如何修改。
求高手指教。谢谢!