I'm trying to find a way of exporting data from an excel spreadsheet into an access database using VB code. I've already extracted data from Access into Excel, but that appears to have been the easy bit.
What I need is either pointing in the direction of some kind of guide, or help in writing a bit of code that allows me to open an access table, delete any records, then update it with the data from the excel spreadsheet (which is already formatted correctly).
Either way, you need to create and run a DELETE SQL statement against the destination table. Once that's done, you then execute a DoCmd.TransferSpreadsheet statement using the Excel file as the filename and the table as the table name.
Are there any examples of those? I'm having to use excel/access 2003, and I've found some bits on 2007 but they don't work in my version. I'm also a little new to intergrating these two together, but other people are making a batallion of mistakes, so I wanted to make it so they couldn't!