Question : Microsoft Access can't append all the records in the append Query

Hi Experts!

I have designed a db in Access2000, Now in this I have got a append query called qryStockCheck, which runs on update event of forms like frmPurchaseProductdetails and form frmSoldProductDetails, this was working fine for sometime and I suddenly got this error saying… “Microsoft Access can't append all the records in the append Query.
Microsoft Acces set 0 field(s) to Null due to a type conversion failure, and it didn’t add 1 record(s) to the table due to key violations, 0 record(s) due to lock violations, & 0 record(s) due to rule violations. Do you want to run the action query anyway?”

And since then I am not able to enter new records, meaning this error keeps popping up?

How do I solve this problem??? And how do I prevent it from happening in future as I cannot afford to stop work as the db is been extensively used for entering daily purchases and Sales.


Please help!

Twinkle

Answer : Microsoft Access can't append all the records in the append Query

Hi twinkle
I can confirm the comments that have been made.
Another example for classic key-violation: in a table called "Invoices", you would normally have a field called "InvoiceNumber" which has to be unique. This would mean, that the field which should be unique, would be the primary Key which would prevent from entering more than one record for the same invoice number.

To find out, what record causes you promlem / would create the "douplicate key violation" make the following:

- copy the content of your existing table to another table (i.e. "DouplicateTest") (using copy and paste)
- edit the table DouplicateTest and remove the primary Key Index (Don't delete the field, use the "Key-Button") and change all fields which have Index "Yes (No Douplicates)" to Indexes "Yes Douplicates OK" (Remember the field names, you will need them later).
- take your append query, change the destination table to the previously created table "DouplicateTest" and save it as "AppendDouplicates", and RUN it (you should not get any error message anymore and Douplicate Records will be appended)
- Create a new Query "Find douplicates Query Wizard" and choose table "DouplicateTest", in Available fields, you choose all fields which you have remembered (where you have removed the primary key and the Index "Yes (No douplicates)", click next and add all other fields. Now you should see the record, creating your Index problem.

Good Luck!
Kind regards, Kusi
Random Solutions  
 
programming4us programming4us