Simple Software Solutions
First make sure you have ADODB referenced in your project
Next
declare the following in your start up Declarations
Public MasterDbConn As New ADODB.Connection
In your Statup Module
MasterDbConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MyMdb & ";"
MasterDbConn.CursorLocation = adUseClient
Where MyMdb is the path and name of your MDB
To use the mdb in your code use the following
Dim Tbl As New ADODB.Recordset
Set Tbl = New ADODB.Recordset
With Tbl
.Open "YourTableName", MasterDbConn, adOpenKeyset, adLockOptimistic, adCmdTable
Or
Dim rs As New ADODB.Recordset
With MasterDbConn
rs.Open "SELECT * FROM TblLoginSessions WHERE fldUserName ='" & WhoAmi & "'And fldOrganisation ='" & szOrgCode & "' ORDER BY fldLoginKey DESC ", MasterDbConn, adOpenStatic, adLockReadOnly, adCmdText
If Not rs.EOF And Not rs.BOF Then
.....
End If
rs.Close
Set rs = Nothing
The above is snapshots of my code and the table names and critieria is defined by yourself.
Code Master:
http://www.icraftlimited.co.uk