By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,728 Members | 2,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,728 IT Pros & Developers. It's quick & easy.

Duplicate Values

P: 5
I'm using Ms Access 2003.
I have five tables called
tblAllContract
tblType
tbInteranlContact
tblSupplier
tblManager

The other four tables are linked to tblAllContracts with Id's.I have a bound form called frmViewContracts where i view all my contracts on the system.This form is from query called qryViewContracts.

I have 150 contracts that are stored on the system.Since i dont want my users to to go through all the contracts when they want to view a specific contract I created a combo combo box from the qryViewContracts where the the users selects the contract they want to view and the information gets populated in the appropriate fields.

The problem is everytime i close the form it gives me an error saying The changes you requested to the table were not successful because they would create duplicate values in the index, prinary key, or relationship. Changes the data inthe field or fields that contain duplicate data, remove the index or redifine the index to permit duplicate entries and try again.The thing is i'm not doing any changes i'm just populating the data in the fields
Jan 23 '08 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Something else is going on, unfortunately there is not enough information here to say what.

What is the record source of the main form?
Is the combo box in the form header?
Have you set the control source of the combo box to anything?
Are you populating the data on the main form or in a subform?
Feb 5 '08 #2

mshmyob
Expert 100+
P: 903
As msquared says we need more info on your design.

But if your fields on your form are bound you ARE changing data when you populate them. Then closing the form tries to save your changes.

I'm using Ms Access 2003.
I have five tables called
tblAllContract
tblType
tbInteranlContact
tblSupplier
tblManager

The other four tables are linked to tblAllContracts with Id's.I have a bound form called frmViewContracts where i view all my contracts on the system.This form is from query called qryViewContracts.

I have 150 contracts that are stored on the system.Since i dont want my users to to go through all the contracts when they want to view a specific contract I created a combo combo box from the qryViewContracts where the the users selects the contract they want to view and the information gets populated in the appropriate fields.

The problem is everytime i close the form it gives me an error saying The changes you requested to the table were not successful because they would create duplicate values in the index, prinary key, or relationship. Changes the data inthe field or fields that contain duplicate data, remove the index or redifine the index to permit duplicate entries and try again.The thing is i'm not doing any changes i'm just populating the data in the fields
Feb 5 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.