Can it be done?
I have a recordset from a query in another database that I wish to be able to save as a table in my current database.
I have used ADO see code below but am not sure how to move forward with this.
One problem I have is I do not have any help files in Access for ADO or ADOX (not sure why) so I cant check any of my syntax or methods.
Any help really welcome.
Thanks
Redapples
Want the best answers? See FAQ181-2886
I have a recordset from a query in another database that I wish to be able to save as a table in my current database.
I have used ADO see code below but am not sure how to move forward with this.
Code:
Dim cnn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strFilePathForConnection As String
Dim qdReport
Dim cat As ADOX.catalog
strFilePathForConnection = "C:\Documents and Settings\redapples.domain\Desktop\temp\Core data Rough Sleepers V5.mdb"
cnn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & strFilePathForConnection, "admin", , -1
rs.Open "qryIndividualsBiographicalRS", cnn, 3, 3
Ok up to here!
Set cat = New ADOX.catalog
Set cat.ActiveConnection = cnn
Set qdReport = New ADODB.Command
qdReport = rs
cat.Tables.Append qdReport
cat.Tables.Append rs
Just trying things here but not sure where to go.
One problem I have is I do not have any help files in Access for ADO or ADOX (not sure why) so I cant check any of my syntax or methods.
Any help really welcome.
Thanks
Redapples
Want the best answers? See FAQ181-2886