..I got this error would you know what to do about it?
It bombs when I ask the conneciton to connect.
Private Sub cmdOk_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdOk.Click
Dim conDatabase As ADODB.Connection
Dim SQL As String
Dim intCheckPwd As Integer
'On Error GoTo Error_Handler
Dim hi As New ADODB.Connection
Dim DBConnection As String =
"PROVIDER=Microsoft.Jet.OLEDB.4.0;Uid=Admin;Pwd=bulgaria;DATA
SOURCE=C:\churchdatabase.mdb;"
';password = bulgaria;database = C:\churchdatabase;DataSource =
local"
hi.ConnectionString = DBConnection
'hi.Mode()
'check that both new and confirm passwords are nonempty
If txtConfirmPwd.Text = "" Or txtNewPwd.Text = "" Then
MsgBox("Enter both and new and confirm password")
Exit Sub
End If
'Check that the new and confirmed passwords match.
intCheckPwd = StrComp(txtNewPwd.Text, txtConfirmPwd.Text,
vbBinaryCompare)
'Determine if we are changing/clearing the current password
'or setting a new one.
If txtOldPwd.Enabled = False And intCheckPwd = 0 Then
SQL = "ALTER DATABASE PASSWORD " & txtNewPwd.Text & " NULL"
conDatabase.Execute(SQL)
MsgBox("The new password was successfully set.", vbInformation)
'Change the current password.
ElseIf intCheckPwd = 0 Then
'Check that the old password was given.
If txtOldPwd.Text = "" Then
MsgBox("Please enter the current (old) password.", _
vbInformation)
'txtOldPwd.SetFocus()
Exit Sub
End If
SQL = "ALTER DATABASE PASSWORD " & txtNewPwd.Text & " " &
txtOldPwd.Text
hi.Execute(SQL)
MsgBox("The password was successfully changed.", vbInformation)
'Password was not confirmed.
Else
MsgBox("The password was not confirmed. Please try again.", _
vbExclamation)
txtConfirmPwd.Text = vbNullString
'txtConfirmPwd.SetFocus()
Exit Sub
End If
'Close out the form and all object variables.
conDatabase.Close()
conDatabase = Nothing
'DoCmd.Close(acForm, "frmDBPassword")
Exit Sub
Error_Handler:
MsgBox(Err.Description, vbCritical)
End Sub