![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am having a problem with primary keys. I have a main table called Transactions. It's primary key is made up of three fields (date, account, amount) so that Access will catch any bills that I try to enter more than once. There is another field, transactionID, that is an autonumber assigned to each record. TransactionID is linked to another table called Distribution. I need this link to perform cascade updates and deletes. When I attempt to do this, Access will not allow me to because this field is not a primary key. Any ideas as to how I can make this work? |
#3
| |||
| |||
|
|
Make TransactionalID the Primary Key (that's the only intended use of the Autonumber field). Cascading updates and deletes should now work. Any child tables should have the Primary Key of the Parent table entered as a long integer foreign key. Note that the content of an autonumver field should never be visible to a human. While it is pretty well going to yield unique numbers, they are not guaranteed to be in a gapless sequence. HTH -- -Larry- -- "delores h." <dhildebrandt (AT) shaw (DOT) ca> wrote in message news:e0bf09d6.0401110840.20d9415b (AT) posting (DOT) google.com... I am having a problem with primary keys. I have a main table called Transactions. It's primary key is made up of three fields (date, account, amount) so that Access will catch any bills that I try to enter more than once. There is another field, transactionID, that is an autonumber assigned to each record. TransactionID is linked to another table called Distribution. I need this link to perform cascade updates and deletes. When I attempt to do this, Access will not allow me to because this field is not a primary key. Any ideas as to how I can make this work? |
![]() |
| Thread Tools | |
| Display Modes | |
| |