Dim strConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;User Id=admin;Password=;"
'*** Query ***'
Dim Conn As ADODB.Connection
Set Conn = New ADODB.Connection
Set objRec = New ADODB.Recordset
strSQL = "SELECT * FROM.... "
Conn.ConnectionString = strConnectionString
Conn.Open
objRec.Open strSQL, Conn, 1, 3
'*** Execute ***'
Dim Conn As ADODB.Connection
Set Conn = New ADODB.Connection
Conn.ConnectionString = strConnectionString
Conn.Open
strSQL = "INSERT INTO...."
Conn.Execute (strSQL)
If Err.Number <> 0 Then
Exit Function
End If
Conn.Close