Sub RecSetOpen()
Dim rst As ADODB.Recordset
Dim strConnection As String
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & CurrentProject.Path & _
"\mydb.mdb"
Set rst = New ADODB.Recordset
With rst
.Open "Select * From Customers", _
strConnection, adOpenForwardOnly
.Save CurrentProject.Path & "\MyResultset.dat"
.Close
End With
Set rst = Nothing
End Sub
|