Results 1 to 9 of 9
  1. #1
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419

    Append data into a table

    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

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    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.

  3. #3
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    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.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    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.

  5. #5
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Thanks for the links of information, it seems like that is not appending but importing or writing to it.

  6. #6
    Join Date
    Apr 2017
    Posts
    1,679
    You link the Excel table, and then use an insert query to read data from linked table and append it into your Access table

  7. #7
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    You may be right, thanks for sharing. I will use query to insert into it. That should work.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    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.

  9. #9
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    Thank you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 08-13-2018, 12:00 PM
  2. Replies: 3
    Last Post: 09-14-2017, 11:42 AM
  3. I need append data from table to another
    By hosni4eg in forum Access
    Replies: 5
    Last Post: 05-15-2017, 08:08 AM
  4. Data append to table
    By ali zaib in forum Access
    Replies: 4
    Last Post: 01-13-2012, 11:22 AM
  5. Append to SQL table failing on data type
    By tpcervelo in forum Queries
    Replies: 2
    Last Post: 10-13-2011, 12:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums