followup cascading deletes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

this is a continuation of a problem I was having last week.
I have a form (actually a subform) which is based on a query joining
employeeinfotbl and bookingstbl. I want a combo box to look up and display
the persons name and their post (information from the employeeinfo table).
The way I have done this is to use the wizard to set up the combo, selecting
'lookup values from a table) and stored the value (employeeID) in a field.
The problem with this is that if a booking needs to be deleted, it tries to
delete the person from the employeeinfo table. All I want is to delete the
booking against that persons name.
I have had some help already, but am still confused as to how display the
information I need against that person, but not delete the persons record
from the employeeinfo table when I delete the booking.
Could someone explain - very simply- how to do this. I am having a bit of a
mental blank!
 
I have been watching this thread because I was curious about the responses.
Since you seem to have had none, I'll jump in.

I am not familiar with the original problem, which means I do not know about
the real-world situation behind the database. What problem are you trying
to solve? You have a subform based on two tables, but I don't know about
your main form's record source, nor about the table relationships. I can
only guess that the subform's record source should be a single table
(bookingstbl) or a query based on that table, and that the employee combo
box should be used to add EmployeeID to the bookings table. There needs to
be a relationship, probably one-to-many, between the employee table and the
bookings table. Again, though, I'm sort of shooting in the dark here.
 
Back
Top