Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error evaluating CHECK constraint

Status
Not open for further replies.

jflachman

Technical User
May 30, 2001
133
US
I have a database (Access 2002) that has worked perfectly for some time. I didn't make any design changes to it, but started to get this error:
Run-time error 3802 - Error evaluating CHECK constraint


The help topic for this error simply says "This is an unexpected error. Please contact Microsoft Product Support Services for more information." I've done a search both here and at support.microsoft.com, no luck.

This occurs when I click on a "Done" button with some code attached.
If I hit "Debug" in the error box, it stops on a line:
[tt]rst.update[/tt] If I use F8 to continue stepping through the code, it will allow that. When I get to DoCmd.Close, the whole database closes (all open forms and the database window) without any additional error messages. Access does not close. I've tried checking the values of all fields and variables to make sure that they have valid values. No insight there.

Any ideas? Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
 
OK, solved this one myself, finally.
About 2-3 months ago, I changed a field in the underlying table from Number, with a validation rule of >=0 <=10 to text with list box of available values (I deleted the validation rule). I've used this form and underlying table quite a bit, it has lots of records with the correct text values.

All of a sudden, the validation rule seems to have returned. It couldn't evaluate the text field against the numeric validation rule. By deleting the validation rule, the problem went away.

I can look in the table and see that I've used this field a lot without getting this error, why would it appear now? Maybe I haven't compacted the database lately, so this validation rule was in the database with a bit indicating it had been deleted. If that bit got corrupted, it might reappear?

I found this by pure luck. I NEEDED to get the data into the database, so I tried to enter it into the underlying table directly and got the same error. That led me to the field design where I noticed the validation rule. Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top