[/FONT]
[FONT=Courier New]Public Const mydb1 = cnn.Open("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\Personal_Files\Access\MAINDB.accdb;Jet OLEDB:Database Password=TsPw;")[/FONT]
[FONT=Courier New]
Public Const DB1_CONNECTION_STRING As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\Personal_Files\Access\MAINDB.accdb;Jet OLEDB:Database Password=TsPw;"
Sub Foo()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Call rs.Open(DB1_CONNECTION_STRING)
'//More code
rs.Close
Set rs = Nothing
End Sub