runtime 3022

J

jamccarley

In my database I was getting a runtime 91 error, so to fix that I added a
record though the table and not the form. For some reason now when I try and
add a new record the correct way it gives me a runtime 3022 error. Plus, I
made backups of my database and this error now shows up on all backups. I
thought a backup would not be affected.
 
B

bcap

Error 91: Object variable or With block variable not set.

This signifies a bug in your code. You haven't "fixed" it by adding a
record directly to the table, you have merely circumvented it. It's still
there, waiting to bite you again when the circumstances are right for it.
You'll need to post the code for the procedure concerned for anyone to be
able to help you.

Error 3022: duplicate key

This is completely unrelated to the previous error. The record you are
trying to add has the same primary-key value as the record already in the
table. Primary-key values must be unique. You will need to post more
information about the table and the data for anyone to be able to help
further.

I can't imagine why you thought you could avoid the error by using a backup.
If the backup file is identical to the backed-up file (which is the general
idea of a backup!) then of course it will exhibit the same behaviour.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top