Connect to a database using code
API Declarations
Dim rec as Adodb.Recordset
Public Sub StartCon()
Set con = New Adodb.Connection
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database.mdb"
'The database file must be in the same path as the application