I am importing a record in an excel file.
I am getting the following error.
"Microsoft Access was unable to append all the data to the table.
The contents of fields in 0 record(s) were deleted, and 1 record(s) were lost due to key violations.
*If data was deleted the data you pasted or imported doesnt match the field data types or the FieldSize property in the destination table.
*If records were lost, either the records you pasted contain primary key values that already exist in the destination table, or they violate referential integrity rules for a relationship defined between tables.
Do you want to proceed anyway?
I know why.
The record already exists. I'm trying to capture the err.number in my error routine, but it seems it's an access internal error. It shows no error number. I tried the on form error, but it never hits it. Any ideas how to capture this error??
I am getting the following error.
"Microsoft Access was unable to append all the data to the table.
The contents of fields in 0 record(s) were deleted, and 1 record(s) were lost due to key violations.
*If data was deleted the data you pasted or imported doesnt match the field data types or the FieldSize property in the destination table.
*If records were lost, either the records you pasted contain primary key values that already exist in the destination table, or they violate referential integrity rules for a relationship defined between tables.
Do you want to proceed anyway?
I know why.
The record already exists. I'm trying to capture the err.number in my error routine, but it seems it's an access internal error. It shows no error number. I tried the on form error, but it never hits it. Any ideas how to capture this error??