Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Duplicate values in index, key or relationship

Posted on 2011-09-22
4
Medium Priority
?
271 Views
Last Modified: 2012-05-12
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.
0
Comment
Question by:Ei0914
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 14

Accepted Solution

by:
pteranodon72 earned 668 total points
ID: 36583983
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
 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 668 total points
ID: 36584009
May be a corrupt form.

I use this: Backing up and Restoring Objects

also try decompiling with the /decompile command line switch
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 664 total points
ID: 36584176
"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
 

Author Closing Comment

by:Ei0914
ID: 36588935
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

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question