Need Help with Access Tables

G

Guest

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
 
G

Guest

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
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top