I'm a brand new access user (2003) trying to follow the tutorial at
cisnet.baruch.cuny.edu/holowczak.... When creating the sample tables (bank
customers and bank accounts) I set the customer ID # as a primary key. Now,
when I go to enter account information for customers that have both savings
and checking accounts, I get the following error message "The changes you
requested to the table were not successful because they would create
duplicate values in the index, primary key or relationship. Change the data
in the field or fields that contain duplicate data, remove the index, or
redefine the index to permit duplicate entries and try again." What am I
doing wrong?
th0r0n - 07 Apr 2005 16:55 GMT
In bank customers, is Customer ID an Autonumber as well as being a primary key?
It should be! Hope that helps.
> I'm a brand new access user (2003) trying to follow the tutorial at
> cisnet.baruch.cuny.edu/holowczak.... When creating the sample tables (bank
[quoted text clipped - 6 lines]
> redefine the index to permit duplicate entries and try again." What am I
> doing wrong?
onedaywhen - 08 Apr 2005 09:15 GMT
> In bank customers, is Customer ID an Autonumber as well as being a primary key?
>
> It should be! >
I do hope my bank doesn't follow your advice. I trust they choose a
better algorithm for generating key values than a random/incrementing
numeric e.g. a fixed length string incorporating a check-digit would
help reduce keying errors that result in my money being paid into
someone else's account etc.
Jamie.
--
th0r0n - 08 Apr 2005 10:35 GMT
Oh,
Sorry,
I didn't realise he was coding the backend for Lloyds, rather than following
a tutorial which is there to illustrate a point, not be secure
:P
> > In bank customers, is Customer ID an Autonumber as well as being a
> primary key?
[quoted text clipped - 10 lines]
>
> --
onedaywhen - 08 Apr 2005 12:35 GMT
> > > In bank customers, is Customer ID an Autonumber as well as being a
> > > primary key?
[quoted text clipped - 8 lines]
> I didn't realise he was coding the backend for Lloyds, rather than following
> a tutorial which is there to illustrate a point
Oh, sorry, so what *was* your point when you suggested using an
autonumber?
Jamie.
--
th0r0n - 08 Apr 2005 13:01 GMT
my point was that not setting the primary key field to an autonumber
sometimes results in this error:
"The changes you
requested to the table were not successful because they would create
duplicate values in the index, primary key or relationship. Change the data
in the field or fields that contain duplicate data, remove the index, or
redefine the index to permit duplicate entries and try again."
> > > > In bank customers, is Customer ID an Autonumber as well as being
> a
[quoted text clipped - 17 lines]
>
> --
Ed Warren - 07 Apr 2005 18:46 GMT
you need a
tableCustomers with customerID as a key field
you need a
tableAccounts
with accountId as a key field
customerID as a foreign key
typeaccount (saving/checking)
relationship to model:
Each customer has many accounts (1:M) Account (M) <----- (1) Customer on
CustomerID
Ed Warren
> I'm a brand new access user (2003) trying to follow the tutorial at
> cisnet.baruch.cuny.edu/holowczak.... When creating the sample tables (bank
[quoted text clipped - 9 lines]
> redefine the index to permit duplicate entries and try again." What am I
> doing wrong?