Need Help with Access Tables

I have created a new table titled "Customer Order" and the fields are 
"Customer ID" "Product ID" and "Quantity Ordered". When I enter data for a 
customer, saying that Customer with ID as 1 ordered 2 amounts of product A 
and then in another field entered that cutomer with ID as 1 ordered 4 amounts 
of product B, Access wont allow me to do so and says that it will create 
"duplicate values in the index, primary key, or relationship". What am i 
doing wrong, and how would i go about entering multiple fields with the same 
customer ID
0
Utf
10/28/2007 4:30:00 AM
access 16762 articles. 3 followers. Follow

2 Replies
626 Views

Similar Articles

[PageSpeed] 43

Hi Joe,
Go to the design of the table customer order and remove the primary key from 
the tool bar ( it looks like a key ),  then you can enter one customer number 
more that ones.
regards
Mark

"cyber_joe" wrote:

> I have created a new table titled "Customer Order" and the fields are 
> "Customer ID" "Product ID" and "Quantity Ordered". When I enter data for a 
> customer, saying that Customer with ID as 1 ordered 2 amounts of product A 
> and then in another field entered that cutomer with ID as 1 ordered 4 amounts 
> of product B, Access wont allow me to do so and says that it will create 
> "duplicate values in the index, primary key, or relationship". What am i 
> doing wrong, and how would i go about entering multiple fields with the same 
> customer ID
0
Utf
10/28/2007 11:05:00 AM
sounds like you have a unique index set for CustomerID. are you using that
field as the table's primary key? if so, you shouldn't - the field is a
foreign key which links the table to your Customers table.

remove the unique index from the CustomerID field; you can set the Index
property to Yes - Duplicates OK. if that is your primary key field, remove
the primary key setting; suggest you add another field "OrderID" to the
table, data type Autonumber, and set that as the table's primary key.

also, recommend you remove all spaces in your table and field names; for
more information, see http://home.att.net/~california.db/tips.html#aTip5.
suggest you read at least the first four tips on this page also.

hth


"cyber_joe" <cyber_joe@discussions.microsoft.com> wrote in message
news:7C40630C-F54E-42C4-8152-A6EEF07C7FD9@microsoft.com...
> I have created a new table titled "Customer Order" and the fields are
> "Customer ID" "Product ID" and "Quantity Ordered". When I enter data for a
> customer, saying that Customer with ID as 1 ordered 2 amounts of product A
> and then in another field entered that cutomer with ID as 1 ordered 4
amounts
> of product B, Access wont allow me to do so and says that it will create
> "duplicate values in the index, primary key, or relationship". What am i
> doing wrong, and how would i go about entering multiple fields with the
same
> customer ID


0
tina
10/28/2007 11:47:51 AM
Reply:

Similar Artilces:

Bar chart help wanted
Hello to everybody ! I have this kind of data: TIME VALUE 0:00:00 0 0:00:34 1 0:00:35 1 0:01:00 0 0:01:30 0 0:01:33 1 0:01:55 1 0:01:59 0 0:02:00 0 0:02:10 1 0:02:15 1 0:03:00 0 0:03:05 0 0:03:07 1 0:03:55 1 0:08:00 0 and I need to create bar chart that would have a bar of the hight equal to 1 at each time value where the "value" in table (Y-axis) equals one (and also between "one"s values). In all other time values the Y value is zero ! Excel bar chart seems to omit all values that are not in the dataset ! I need to include also those time values that are not expli...

Pivot table help #11
I needed help with a Pivot table. In the attached excel sheet i am trying to use the Creatiion date (coloum X)as one of the filters in the pivot table. Could someone please guide me as to how i can filter with the Creation date as one of the pivot tables. Thanks Sammy ...

Need help with a query
Let me start by saying that I have very little experience in Access. I've learned what I know by "tinkering" around in it and a lot of the terminology I've seen on these boards is above my head. Here's the background to my question. I created an employee database that consists of one massive form with several tabs and on each tab there are several subforms. The main form was created from the Employee Header table and the subforms were created from queries from tables. The idea is when you open the form, you see an employee's basic info on the top ...

help. outlook 2007. not listing contacts
Hi all, i have a small problem in that some of my contacts are not listed in my contacts, example: in address bar type 'b' get a list of all my 'b' contacts, barbara, ben, bill, etc but none of them appear in my address book, or contacts. only listed if i add them to address bar. My question is: where are they stored cos I want to delete one or more. I think they are addresses i have only replied to and never 'created' but have used for new messages, by just typing the first letter and selecting from there. Help please. Many thanks in advance. Lepak Lepak Nera...

Help, Excel Files Being Wiped Out: Data Lost or Corrupted
When I try to open certain Excel files, I get this message: Unable to read file. [OK] Unable to read file. [OK] Errors were detected ... MS was able to open the file by making the repairs below. Save the file to make the repairs permanent. Damage to the file so extensive that repairs were not possible. Excel attempted to recover your formulaes and values, but data may have been lost or corrupted. The resulting file is devoid of any formatting, and some formulaes are gone. It's really no use since it takes so much time to reconstruct these files. I've been saving 4 different v...

Weighted average in a pivot table
Is there a way to present a field as a weighted average in a pivot table? Consider the following data: Month Amount Rate Jan 1000 10% Jan 7000 6% In a pivot table, if the the field Rate is presented as an average, the value for january would be 8% ((10%+6%)/2); I would like to have the weighted average instead, that is 6.5% ((1000*10%+7000*6%)/(1000+7000)) Thanks. Add a column (Interest) to your source data, in which you calculate the interest. For example, in cell D2: =B2*C2 Include this column in the pivot table source, and refresh the pivot table. From the PivotTable ...

move table of contents page numbers
Hi. I am using Word 2007 and I am trying to create a table of contents with the page numbers in front of the heading title with a bar between. I see the modify tab with bar, but I can't move the numbers in front of the bar and keep them there when I update the table. An example of what I am looking for is:: 3 | Introduction 4 | Heading 1 Is this even possible? I've been struggling with this for a while. Thanks for your help!!!! It is not possible to do anything of this sort and still have an updatable table of contents. If you're really determined ...

Which Office 2010 Configuration Do I Need For Our New Business?
We are starting a new medium sized business and need help deciding which MS Office products we will need. Can someone direct me to the proper place to get this information? So far I haven't been able to find anything. Thanks Office 2010 is still in BETA. You could review all info out there for 2007 which is available for purchase. Saidas wrote: > We are starting a new medium sized business and need help deciding which MS > Office products we will need. Can someone direct me to the proper place to > get this information? So far I haven't been able to find a...

Access Form: No content with JOIN source
Hello NG, I have a form in Access 2003 with some Combobox and Textbox controls. The form has a SQL Stmt as Datasource (click on the dark grey in the Form and choose Properties and Data). If I choose a simple SQL stmt like "Select * From X Where ID=AAAA", where AAAA is a foreign variable, my form works. All data is displayed. If I change the SQL to a JOIN stmnt I get nothing. The form is complete blank. No Textboxes or Comboboxes are displayed. I mean: Not only the content is missing, the controls itself are missing. Do you have an idea how I could change this behavior? ...

How do I get a chart to only display the dates in my table?
I am trying to graph a large group of data. It is a series of dates (not all consecutive) - with the time it takes to do a task on each of the dates. When I graph it - it fills in all the "missing" dates. For instance lets say a set of data would be: Date: 12-1-08 12-5-08 12-6-08 12-6-08 12-12-08 Time: .5 .34 .93 1.2 .25 On my graph it would put a date for every date between 12-1 and 12-12 even if there is no data. Is there any way to have Excel graph only the dates that have data? Change the axis from t...

access or excel template for pricing comparison between companies.
looking for a template to compare 4 co's pricing based on a select criteria. Can be either excel or access. Would like a sheet that prints out for the customer showing the results. -- coop Hello Coop, I would like to offer to build the Access database you need. I provide fee-based help for Access, Excel and Word applications. My fee to help you would be very modest. If you would like to work together, email me at my address below. Steve santus@penn.com "coop" <coop@discussions.microsoft.com> wrote in message news:CFBACF9B-FC4E-472E-97F9-9B2A9...

Help with profiles .pst files and roaming profiles
Hi all and thanks in advance for the future answers; Well, we have a enviromente that goes like this: 1 Domain Controller 1 Mail Server running KERIO MAIL SERVER 2 Terminal Servers running CITRIX PS 4.5 1 Server running the citrix console The problem: We have like 50 users now that connect to servers A or B and have their roaming profile working fine, all files and configs come and go, with the exception of the OUTLOOK profile. When i had to add SERVER B to the system, i had to copy users folders from server A and apply the same permissions one by one, otherwise outlook would not work and ...

Any Way to Run Access Function in Separate Process?
We have a modal dialog in an Access application, that upon confirmation goes out and does about 25 minutes of queries and then puts the result on the clipboard. This long processing period locks the user out from the rest of the application. We want to find a way to have this 25 minutes of data gathering run in the background without blocking the user from interacting with other parts of the application. Is there any way to launch the function that takes so long to run in a separate process space, so that it doesn't lock up the application while it runs? We would obviously n...

Programmatically accessing the diagram pane of the Query Design view
Hello all, Is it possible to programmatically access the diagram pane of the Query Design view? I have some queries that have as many as 12 tables in the diagram pane. I would like to be able to size and arrange these tables programmatically so everything looks nice and neat. Thanks for any help anyone can provide, Conan Kelly I'm not aware of any method, but then I don't see the need for one either. No one else should see your queries: they should be using forms for all their interactions with the database. And all that really matters is the SQL that's generated for...

Help rank features for future Dynamics GP releases
Each year, we ask customers to give us valuable insight into the enhancement of our products. When you give us your feedback and opinions, you help us refine our software to make it even more customer friendly. Please take a few moments to visit the URL below and complete the Product Advisory Board Survey now. This forum is an important way for us to get your opinion on our products, but this special opportunity is available for a limited time. https://mbs.microsoft.com/customersource/pabs -- This posting is provided "AS IS" with no warranties, and confers no rights. We w...

Need control to not display its data under certain circumstances
I have a form that saves "99" for a particular field if that field is left blank (which for us means that we tried, but weren't able to collect that information). However, when I load that form for a pre-existing record, I would like these fields to not show the 99, but rather to appear empty. Is there a way to do that through the control properties? Meaning, is there a way to not display the saved value for a particular control if the data saved for it was a 99? Thanks for your help. Try conditional formatting. Create a condition that says, if the value of the control = 99, ...

help!!! #2
Can somebody tell me the name and location of the file that holds the address book? I have reinstall the outlook and imported the contacts from a comma delimited file, all of the contacts appear on the contact folder but when I open a new message window and click on the TO: button to add recipients a message saying that the address book could not be found and after that it shows a window asking for the proper list to show in a drop down list; that drop down list says 3 times the word "contacts" and if I select the second then all the contacts would appear but I don't kn...

Office Help and Embeded links
Strange problem on one machine. Help files work, however, like the show all link or any of the other links that show up, clicking on them does nothing. All other machines are working with not problem, just this one. Uninstall/reinstall does not work. It is not the customer feedback problem or the default browser. Any ideas? ...

Chart display help
How can I have the chart bars display the percentages and the data labels be the raw numbers? Is this possible? Hi, By default bar charts don't display percentages, however, you could create custom data labels by combing a calculation of the percentage with the actual value in another range and the using a program like the free XL Chart Labeler to pick up that range for the data labels. http://www.appspro.com/Utilities/ChartLabeler.htm Suppose the numbers that are your Values are in C2:C10, create a new column by entering the following formula in D2 =C2/SUM(C$2:C$10) Copy this fo...

Connectnig My Access Database (2002) to Excel 2002
I am simply trying to run my query in excel from an access table. So far I have the following: With ActiveSheet.QueryTables.Add(Connection:= _ "ODBC;DRIVER=(What is the driver I should eb using?); (What other parameters do I need here?), Destination:=Range("A1")) Thanx! See your other thread -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Tangier" <nitinhemmady@gmail.com> wrote in message news:97703823-d471-46f1-a9cf-4585c4d7a0c2@m44g2000hsc.googlegroups.com... >I am simply trying to run my query in excel from an access table...

Suggestions exchange server mailstore best practices needed
I am running out of back-up space for my exchange server. When users move mail from their inbox into another mail folder is the mail still on the server or the local drive? If I have users move mail out of their inbox into the folder tree am I saving any space on the server? Do anyone have an suggestions on how I might better get my users to manage their inboxes? thanks the only time data is being moved off the Exchange server is when it's deleted (and even then, if DIR is configured, it isn't removed right away) or if it's been moved to "personal folders"...mov...

Operator[] overloaded but how to access it as pointer?
hi all, I Overloaded the operator [] : double &operator[](DWORD); double &Classname::operator[](DWORD p) { return m_array[p]; } The problem is , I need to know how to access the operator if I yust have a pointer to the object. I want do something like the following : Classname* pObj; pObj = new Classname(); double test = pObj[0]; // that doesnt work , is there any possiblity to realize that? thanks a lot cheers Filip How about (*pObj)[0] -- Hank Williams Quantum Technologies, Inc. HaWilliams(at)spamcop.net "Filip Lyncker" <lyncker@gmx.de> wrot...

Run-time Error '-2147217900 (80040e140': HELP!!
I receive the above error when I syn my offline database on one machine. Have disabled any firewalls and checked administrative rights. The rest of the error states "SQL Server blocked access to STATEMENT 'openrowset.........." Thanks Open Sql Server Surface Area Configuration, click on Surface Area Configurationi for Features at the bottom of the screen, Check the Enable OPENROWSET and OPENDATASOURCE support box. Then try to sync the database. "Tony" wrote: > I receive the above error when I syn my offline database on one machine. Have > disabled any f...

Items Not Found in Lookup Tables
I'm setting up Lookup Tables for the first time, and have gotten myself into some trouble along the way. If an item is not found in my Lookup Table, it seems to pick up the closest item alphabetically. How do I prevent this from happening? Is there anything I could put in my Lookup Table that would be a catch all for items not found, and would act as an alert to me that the table needs to be updated with new values? Thanks! There's a fourth argument that specifies that you want an exact match: =vlookup(a1,sheet2!a:b,2,false) That False (or 0) tells excel to look for an exact...

Restricting Internet Email Access
I'm still setting up my Exchange 2003 server in a W2K3 domain running in native mode. This is a very simple configuration with a single DC and a single Exchange server. I am looking at using an SMTP relay out in our DMZ and keeping the Exchange server behind the firewall. My problem is I need to allow some users to send and receive email only within the company while other users need the ability to send and receive mail both internally and externally. Any suggestions on how to achieve this will be greatly appreciated. Thanks, Keith Hi, 1. Click "Start", point to "...