Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2009
    Posts
    9

    Exclamation Unanswered: Import Excell data into Access table

    Dear all
    I need help about the VB code to Import data from excell table into access table which already has old data.
    I mean Import data to access table but the access table not impty, its has too much records

    How I can force the access table to go to 1st to the blank record set and start importing the dat ainto it?

    Thanks

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Look at TransferSpreadsheet in VBA help.
    Paul

  3. #3
    Join Date
    Nov 2009
    Posts
    9
    Dears
    Can any one help by the VB code to allow update the access table data NOT to make new access table by import excell data

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I assume you haven't looked at TransferSpreadsheet, since it will import Excel data into an existing Access table.
    Paul

  5. #5
    Join Date
    Nov 2009
    Posts
    9

    Thumbs up Thanks

    Sir
    Thanks for your help
    I did this code and it's working well

    Private Sub cmdImport_Click()
    DoCmd.GoToRecord , , acNewRec

    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel3, "ApprovedTable", "D:\FillSheet.xls", True
    DoCmd.Requery
    Msg = MsgBox("Data Imported to Access Data Base", vbInformation)
    End Sub

    But how I can put some validation about the data to import in right case

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Not sure exactly what you mean. One common technique when you have to manipulate data being imported is to import it into a local temporary table, do your validation/manipulation, then copy the final data from the temporary table to your actual data table.
    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •