Dim adoConn As ADODB.Connection
Dim adoRS As ADODB.Recordset
Set adoConn = New ADODB.Connection
adoConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;DataSource=F:\river30.mdb"
adoConn.Open.........停在這一行出現錯誤訊息
SQL = "select * from company where id=" & text1.text
Set adoRS = adoConn.Execute(SQL)
If adoRS.EOF Then
MsgBox "沒有此股票", vbOKOnly, "錯誤訊息"
End If