C
coalchamber
Hello all,
I am in a state of confusing.
I am creating a small database to be used to track who has borrowed
what dvds from me. So far, i have 3 tables:
1. DVD collection
2. Customer
3. Borrow Table
My plan is to have all customers in the customer table, all dvds in
the dvd collection table and create a record in the borrow table when
ever one borrows a dvd simply by recording the customerID and DVDID.
When it is returned i will delete that record so that dvd is no long
seen as being borrowed.
I have made a one to many relationship between the primary key
(customerID) to the customer ID column in the borrower table. And a
one to one from the DVDID in the dvd collection table to the DVD id
column in the borrow table (since at home a person will only have 1
copy of a dvd).
Here comes the problem. I have used the built in commend button that
deletes a records from a table. Here i created a form that views all
records in the borrow table and when the record is found which
contains the data of the dvd jsut returned i press the button to
delete that record. Sadly, it will no only delete the record in the
borrow table, it will delete the record in the DVD collection table.
Is there a way around this? Is there a way in which i can write a
query to delete just that record? I was looking at the code on the
click event for the button but it is alittle over the top for me. I
would prefer not to change the design because i have based other
things off this design (reports, new borrowings etc) but if it comes
to it i will.
I hope i have explain this correctly, and i help i am understood
I am in a state of confusing.
I am creating a small database to be used to track who has borrowed
what dvds from me. So far, i have 3 tables:
1. DVD collection
2. Customer
3. Borrow Table
My plan is to have all customers in the customer table, all dvds in
the dvd collection table and create a record in the borrow table when
ever one borrows a dvd simply by recording the customerID and DVDID.
When it is returned i will delete that record so that dvd is no long
seen as being borrowed.
I have made a one to many relationship between the primary key
(customerID) to the customer ID column in the borrower table. And a
one to one from the DVDID in the dvd collection table to the DVD id
column in the borrow table (since at home a person will only have 1
copy of a dvd).
Here comes the problem. I have used the built in commend button that
deletes a records from a table. Here i created a form that views all
records in the borrow table and when the record is found which
contains the data of the dvd jsut returned i press the button to
delete that record. Sadly, it will no only delete the record in the
borrow table, it will delete the record in the DVD collection table.
Is there a way around this? Is there a way in which i can write a
query to delete just that record? I was looking at the code on the
click event for the button but it is alittle over the top for me. I
would prefer not to change the design because i have based other
things off this design (reports, new borrowings etc) but if it comes
to it i will.
I hope i have explain this correctly, and i help i am understood