473,769 Members | 3,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Duplicate Values

5 New Member
I'm using Ms Access 2003.
I have five tables called
tblAllContract
tblType
tbInteranlConta ct
tblSupplier
tblManager

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

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 qryViewContract s 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 1871
MMcCarthy
14,534 Recognized Expert Moderator MVP
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 Recognized Expert Contributor
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
tbInteranlConta ct
tblSupplier
tblManager

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

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 qryViewContract s 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

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

Similar topics

8
3306
by: Mark | last post by:
When my form goes to a new record, I have a procedure that copies the last record added to the form's underlying table into the form. The intent is that a series of new records may have the same data in many of the fields so I paste in the same values of the previous record and then edit what needs edited in the new record saving much retyping of the same data. Doing this however creates the definite possibility of creating a duplicate...
9
5100
by: vbportal | last post by:
Hi, I would like to add BitArrays to an ArrayList and then remove any duplicates - can someone please help me forward. I seem to have (at leaset ;-) )2 problems/lack of understanding (see test code below): (a)When adding BitArrays to the ArrayList and then looping through the ArrayList I seem to access only the latest added BitArray and I'm not exactly clear on best way to access each BItArray in the ArrayList (b)When I try to remove...
4
4387
by: sri2097 | last post by:
Hi all, I'm storing number of dictionary values into a file using the 'cPickle' module and then am retrieving it. The following is the code for it - # Code for storing the values in the file import cPickle book = {raw_input("Name: "): } file_object = file(database, 'w+') cPickle.dump(book, file_object)
3
5212
by: skennd | last post by:
Here's my problem in exact replication: I have used the find duplicate query in Access, and the query determined the following duplicate values by the following query: In (SELECT FROM As Tmp GROUP BY HAVING Count(*)>1 )
5
3993
by: Manish | last post by:
The topic is related to MySQL database. Suppose a table "address" contains the following records ------------------------------------------------------- | name | address | phone | ------------------------------------------------------- | mr x | 8th lane | 124364 | | mr x | 6th lane | 435783 | | mrs x | 6th lane | 435783 |
4
5866
by: FangQ | last post by:
hi I am very new to mysql. I have a question about using the "on duplicate update" clause with insert command. my table "data" has two columns, field1 and field2, where field1 is the index and is "unique". when I run
2
2436
by: mavmavv | last post by:
I have a Form where I have created a duplicate record button, no problem... The subform is where my problem lies. The subform displays data matching the mainform's ID, these two values are linked. The subform has no primary key, since there are multiple matching entries. Basically the mainform displays Customer info + order totals, and the subform displays the products. When I goto duplicate the record, the ID from the duplicated...
3
10947
by: rajeshkrsingh | last post by:
Hi friends, Step1- create table duplicate ( intId int, varName varchar(50) ) insert into duplicate(intId,varName) values(1,'rajesh') insert into duplicate(intId,varName) values(2,'raj12') insert into duplicate(intId,varName) values(1,'rajesh')
2
2583
by: raphael001 | last post by:
In my Visual Basic program I'm just trying to find duplicate values entered into an array from an inputbox, but i can't seem to get the coding right on the final part to check for duplicate values already entered. Any help would be greatly appreciated. This is what i have so far except the code to check for duplicate values: Dim intarray() As Integer Dim intindex As Integer Dim intcount As Integer Dim intsearch As Integer Dim intlow As...
4
2911
by: ramdil | last post by:
Hi All I have table and it have around 90000 records.Its primary key is autonumber field and it has also have date column and name, then some other columns Now i have problem with the table,as my table contains duplicate entries for a particular date.How can i delete the duplicate entries from the table for that particular column,Now i am doing manually with name column as it will be unique for that date.Can any one help me giving the query...
0
9587
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.