提示类型未定义
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Form_Load()
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\销售表.mdb;Persist Security Info=False"
If rs.State = adStateOpen Then rs.Close
conn.CursorLocation = adUseClient
conn.Open
rs.Open "select * from 用户表", conn, 3, 3
Set DataGrid1.DataSource = rs
DataGrid1.Refresh
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
End Sub
End Sub
运行后一直提示
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset 类型未定义