Results 1 to 3 of 3
  1. #1
    Emma35 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Location
    Ireland
    Posts
    65

    Importing From Excel

    Hi All,


    I have a database which imports training records in the form of an Excel sheet into a table in Access. My problem is that it's only importing unique records, even though an employee may have 10 different training records, it will only import one of them ?. I'm using the VB code below in the OnClick event of a command button to handle the importing of the records from Excel. Any help would be very much appreciated. Thanks Em

    Code:
    Private Sub cmdWrappers_Click()With DoCmd
        .SetWarnings False
        .OpenQuery "qry_DeleteWrappingEnd"
        .TransferSpreadsheet acImport, 10, "tbl_WrappingEndRecords", "S:\WrappingEndTrainingRecords.xlsx", True, ""
        MsgBox "Wrapping End Training Records Imported !", vbInformation + vbOKOnly, "Database Update Successful !"
        .SetWarnings True
    End With
    End Sub]

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Is the table keyed/indexed on a field?
    This would prevent dupes. Remove them.

  3. #3
    Emma35 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Location
    Ireland
    Posts
    65
    I'm such a moron ....thanks ranman that's exactly what was causing it

    Appreciate the help as usual
    Emma xx

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

Similar Threads

  1. Replies: 10
    Last Post: 12-28-2012, 02:06 PM
  2. Importing Excel
    By Palhay in forum Import/Export Data
    Replies: 1
    Last Post: 08-08-2012, 06:15 AM
  3. Need Help about importing from Excel
    By Nicc V in forum Access
    Replies: 6
    Last Post: 12-12-2011, 03:11 PM
  4. Importing from Excel
    By itm in forum Import/Export Data
    Replies: 1
    Last Post: 07-20-2011, 07:12 PM
  5. Importing from Excel
    By joer in forum Forms
    Replies: 0
    Last Post: 03-14-2007, 02:01 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