Duplicate values in index, key or relationship

Hey - I know what this error means and have resolved it many times -- but this time I can't seem to find where this is happening. I have a form with multiple sub-forms and when the user clicks on a tab they get the message. There are no relationships in the db. There are unique indexes and key fields in the tables -- and I don't see anything wrong.

What I'm looking for is suggestions on trouble-shooting this. I am out of ideas.

Thanks.
Eileen MurphyIndependent Application DeveloperAsked:
Who is Participating?
 
pteranodon72Connect With a Mentor Commented:
Work with one problem subform at a time. Look at the combination of its recordsource, the LinkMasterFields (LMF) and LinkChildFields (LCF). If there are fields listed in LMF and LCF, then the parent form is going to put the same value into the LCF of the subform's table/query multiple times, so the base table must allow duplicates of that foreign key. Look out for key field names in different tables with the same name. Keep in mind that the LCF doesn't have to appear on the subform to be automatically filled in the base record.


When you say the user "clicks on a tab", does that mean they are on the main form and are clicking a subform or the other way around?  Clicking a subform or parent form commits the record in progress, so let's figure out whether the error comes from the main form or subform.

Please give the table structure of your main form and subform.

HTH,

pT72
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPConnect With a Mentor Commented:
May be a corrupt form.

I use this: Backing up and Restoring Objects

also try decompiling with the /decompile command line switch
0
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
"I have a form with multiple sub-forms and when the user clicks on a tab they get the message."
Then you probably have some code on these forms...
Check there as well.
0
 
Eileen MurphyIndependent Application DeveloperAuthor Commented:
Thanks for all the suggestions. Sometimes it's like looking for a needle in a haystack. It's hard to come in after another developer and try to figure out what they were thinking.

Thanks again!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.