I've been having trouble connecting to an Access database without using the ADO data control. Whenever I run the program, VB highlights the open method of the connection and gives me an error msg of "Expected function or variable". I checked and made sure my variables were spelled the same throughout the module, but this hasn't helped. There is part of the code below. Can anyone see a problem w/ it? Thx.
Option Explicit
Dim mcnAP As Connection
Dim mrsVendors As Recordset
______________________________________
Private Sub Form_Load()
Set mcnAP = New Connection
Set mrsVendors = New Recordset
mcnAP.CursorLocation = adUseClient
mcnAP.Open = "Provider=Microsoft.Jet.OLEDB.3.51;" & _
"Data Source=A:\Chapter6Bound\AccountsPayable.mdb"
mrsVendors.Open "Select * From Vendors Order By _ VendorName", _
mcnAP, adOpenStatic, adLockOptimistic, adCmdText
LoadControls
SetNavigationButtons True
End Sub