Re: Connect to Access 2000
I figured it out. Just in case anyone else wants to know. This code seems to work.
Option Explicit
Public cnDB As adodb.Connection
Public Sub OpenConnection()
'On Error GoTo Err_Checker
Dim AccessConnect As String
Set cnDB = New adodb.Connection
AccessConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=KettleDatabase.mdb;" & _
"DefaultDir=C:\MMI\Kettle;" & _
"Uid=Admin;Pwd=;"
cnDB.ConnectionString = AccessConnect
cnDB.Open
'Load the main form
frmMain.Show
Exit_Checker:
Exit Sub
Err_Checker:
MsgBox "OpenConnection" & vbCrLf & Err.Number & " - " & Err.Description
Resume Exit_Checker
End Sub
Re: Connect to Access 2000
Use the following connection string
sConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & DBNAME & _
";Persist Security Info=False"
cn.Open sConn
Iouri Boutchkine
[email protected]