Can someone show me some code examples that append data into a table ?
The table already have data there, I just want to append more data into it.
Thanks
Can someone show me some code examples that append data into a table ?
The table already have data there, I just want to append more data into it.
Thanks
Do data entry. Otherwise, you need to be more specific. Append data from where?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Using VBA to append data from an excel file onto a specific table that already has data. We just want to add more data to it.
The columns name and number of columns are the same from the file to the access table.
If the Excel sheet is simple enough, try the import wizard. Or for VBA ideas review http://www.accessmvp.com/KDSnell/EXCEL_MainPage.htm
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks for the links of information, it seems like that is not appending but importing or writing to it.
You link the Excel table, and then use an insert query to read data from linked table and append it into your Access table
You may be right, thanks for sharing. I will use query to insert into it. That should work.
Yes, can set link with External Data import/link wizard then run INSERT SELECT action. Or use VBA to link - which is basically what TransferSpreadsheet method does for you.TransferSpreadsheet method can import to existing table. Ken also shows other methods for pulling data from Excel, including a SELECT query I adapted to this one-liner I tested with my db:
CurrentDb.Execute "INSERT INTO Condos SELECT T1.* FROM [Excel 8.0;HDR=YES;IMEX=1;Database=C:\Users\June\Condos.x lsx].[Sheet1$] AS T1;"
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thank you.