Query problem

  • Thread starter Thread starter Lauren
  • Start date Start date
L

Lauren

I am at my wits end and I hope someone can help!

I have created a database that houses all of my company's
business contacts. There is a query which allows us to
view the contacts by business unit (or team). What the
user does is choose a business unit from a combo box and
then a form displays which allows the user to edit, add or
delete contacts. This form is based on a query that has 2
tables: a main and a related table. What is happening is
whenever a contact is deleted, the business unit selected
originally is deleted from the related table, which of
course deletes all the contacts related to that business
unit. I have specified referential integrity but I have
not checked cascade edits or deletions and still I get the
problem. What am I doing wrong? If anyone can shed some
light, I would greatly appreciate it.

Thanks!
Lauren
 
What is happening is
whenever a contact is deleted, the business unit selected
originally is deleted from the related table, which of
course deletes all the contacts related to that business
unit.

Does it actually delete the record FROM THE TABLE? or merely make it
invisible to this Query, because there is now no linking field from
the contact table?
 
Hi John,

Thanks for responding. Yes, the record is actually being
deleted from the related table. I actually got something
to work, however I'm not sure how efficient it is. What I
did was create a holding table for my selected business
unit. Then used the field from the holding table in the
query that generates my resulting form. I used the from to
delete a test record and found that my business unit was
not deleted from my related table. If there is a better
way to do this, please let me know.

Thanks so much for your time.
Lauren
 
Back
Top