VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



connect to MS Access database

by tony (9 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 19th May 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

connect to MS Access database

Rate connect to MS Access database



Option Explicit
Public HRConnected As ADODB.Connection

Public Sub ConnTo_HR_DB()
On Error GoTo ErrHandle

    Set HRConnected = New ADODB.Connection
    
    With HRConnected
        .Provider = "Microsoft.Jet.OLEDB.4.0"
        .ConnectionString = "Data Source=Z:\HRD_MIS.mdb;Persist Security Info=False;Jet OLEDB:Database Password=hrddb"
        .Open
    End With

ErrExit:
    Exit Sub

ErrHandle:
    MsgBox Err.Description
    DoCmd.Quit
    Resume ErrExit

End Sub


Download this snippet    Add to My Saved Code

connect to MS Access database Comments

No comments have been posted about connect to MS Access database. Why not be the first to post a comment about connect to MS Access database.

Post your comment

Subject:
Message:
0/1000 characters