errors while importing

  • Thread starter Thread starter Ernie
  • Start date Start date
E

Ernie

This may be a roundabout way to accomplish this and I hope
that an MVP or lurker will correct me but:

What I would do is in Excel, highlight your table (or the
part of it that you want to import), then use Copy / Paste
Special / Values.

In this way the table that you are importing doesn't have
any formulas for Access to stumble over and then you
shouldn't get all these errors.

HTH
 
My importing method is automated using VB.ie

Private Sub Command0_Click()
Dim filename As String
filename = Dir("c:\cementWorksheet\*.*")

DoCmd.SetWarnings True
Do Until filename = " "
DoCmd.TransferSpreadsheet acImport,
acSpreadsheetTypeExcel8, "Supplier", "c:\cementWorksheet\"
& filename, True, "Supplier Raw Data!A1:W11"

DoCmd.TransferSpreadsheet acImport,
acSpreadsheetTypeExcel8, "Company", "c:\cementWorksheet\"
& filename, True, "Company Raw Data!A1:Q2"
filename = Dir
Loop
End Sub

some of the fields in excel are empty and they get
imported alright as empty fields.
My importing works fine except it produces error tables
for each row being imported thus having to delete all the
error tables which makes the whole automation thing
useless.
And also i get THE CONTENTS OF THE FIELDS IN 0 RECORDS
WERE DELETED, AND 9 RECORDS WERE LOST DUE TO KEY
VIOLATIONS. for each row of data being imported.

Somebody help pliz coz i av been working on this for the
last 5 days.
 
Back
Top