错误提示“没有为命令对象设置命令”什么意思?
我在类模块中有一窗体,showForm起调用form,代码如下,但运行后提示“没有为命令对象设置命令”,但以下语句在另外的类模块中运行时没有问题的
Public Function showForm(i As Integer)
Dim rs As Recordset
Dim strSQL As String
Dim intRow As Integer
Dim intCol As Integer
Select Case i
Case 1
strSQL = "select * from Country"
Case 2
strSQL = "select * from Area"
Case 3
strSQL = "select * from Agent"
Case 4
strSQL = "select * from customer"
End Select
Set rs = Cn.Execute(strSQL)
End Function