有问题问大虾--数据源的问题
dubi 2002-08-06 09:55:34 Private Sub Form_Load()
Dim str As String
Dim stm As String
Dim jk As String
Dim Cnn As Connection
Dim Rs As Recordset
With Me
.Left = (Screen.Width - .Width) / 2
.Top = (Screen.Height - .Height) / 2
End With
str = "dbq=" & App.Path & "\tongji.mdb;" & _
"Driver={Microsoft Access Driver (*.mdb)}"
MsgBox str
Set Cnn = New Connection
Cnn.CursorLocation = adUseClient
Cnn.Open str
End Sub
执行到: Set Cnn = New Connection
就出现了
编译错误:
无效使用New关键字
的错误,我在模块中也定义了 Connection变量也在工程中引用了响应的东东呀。
这是为什么