J
Jon Ley
I have an Access XP database application in which I import Excel spreadsheets
(using DoCmd.TransferSpreadsheet in VBA code). This has been working fine for
a while, and then I came across a spreadsheet that would not import fully. Of
355 records in the spreadsheet, only about 50 imported. I get a message
stating that:
The contents of fields in 0 record(s) were deleted, and 0 record(s) were
lost due to key violations.
The message goes on to give various suggestions about referential integrity
and validation issues, none of which is relevant in my situation - it's a
temporary table with no field validation or relationships with other tables.
If I import to a new table it works fine, except that a couple of my fields
are memo fields and the new table is created with these fields as text (255),
so this is no good to me.
In desperation I started playing around with the DoCmd.TransferSpreadsheet
command, and tried going back to earlier versions for the SpreadsheetType
parameter. The spreadsheet I am importing was actually created in Excel XP,
but for some reason the import only works if I use acSpreadsheetTypeExcel3 or
acSpreadsheetTypeExcel4. Anything later than this and I get my original
problem back.
Anyone out there have any ideas? Is this a known issue with Access XP?
(using DoCmd.TransferSpreadsheet in VBA code). This has been working fine for
a while, and then I came across a spreadsheet that would not import fully. Of
355 records in the spreadsheet, only about 50 imported. I get a message
stating that:
The contents of fields in 0 record(s) were deleted, and 0 record(s) were
lost due to key violations.
The message goes on to give various suggestions about referential integrity
and validation issues, none of which is relevant in my situation - it's a
temporary table with no field validation or relationships with other tables.
If I import to a new table it works fine, except that a couple of my fields
are memo fields and the new table is created with these fields as text (255),
so this is no good to me.
In desperation I started playing around with the DoCmd.TransferSpreadsheet
command, and tried going back to earlier versions for the SpreadsheetType
parameter. The spreadsheet I am importing was actually created in Excel XP,
but for some reason the import only works if I use acSpreadsheetTypeExcel3 or
acSpreadsheetTypeExcel4. Anything later than this and I get my original
problem back.
Anyone out there have any ideas? Is this a known issue with Access XP?