each nonempty row gets placed in a corresponding column in the database
-
Wednesday, August 08, 2012 12:19 AM
I have created an Access database, db1. I want to initialize it with data from Excel but I do not want to Import it from Excel to Access. Access needs a "conn" to find the file and enable the data transfer and a recordset to write to the database. Could someone please give me an example on the syntax of the conn and recordset and how to use them in an excel speadsheet to populate an Access database. I keep getting an error in the first Dim line of the conn.
Dim conn As ADODB.Connection
Set conn = CurrentProject.Connection
Dim rs As New ADODB.Recordset
rs.ActiveConnection = conn- Edited by Philosophiae Wednesday, August 08, 2012 10:27 AM
All Replies
-
Wednesday, August 08, 2012 2:17 PMAnswerer
If you need transfer of data do experiment with DoCmd.TransferSpreadsheet of Access Object.Lot of option is there for simple transfer.
Best Regards,
Asadulla Javed, Kolkata
---------------------------------------------------------------------------------------------
Please do not forget to click “Vote as Helpful” if any post helps you and "Mark as Answer”if it solves the issue.- Proposed As Answer by Leo_GaoModerator Friday, August 10, 2012 1:51 AM
- Marked As Answer by Leo_GaoModerator Tuesday, August 14, 2012 1:09 AM

