469,963 Members | 2,394 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

Duplicate Values

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
2 1612
MMcCarthy
14,534 Expert Mod 8TB
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
904 Expert 512MB
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.

Similar topics

4 posts views Thread by sri2097 | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.