Deleting data

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

Guest

How can I delete data that has relationships. For example I have a talble
for clients and another table for individual members. So they are related.
When I try to delete a particular person, ACCESS tells me I can't do it
because the table is related to another table (sub-form). Any help would be
greatly appreciated.
 
Go to the Relationships window and click on the relationship line between
your two tables. Check Cascade Delete. When you delete a client, all
associated members of the client will also be deleted.

BTW, if you are getting a warning message when you try to delete, add the
following to your code:
DoCmd.SetWarnings False
<Your delete code>
DoCmd.SetWarnings True


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!
 
PC Datasheet said:
If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!

To the OP: Beware of this guy!!

Steve just does *not* care about the newsgroups. He has *no ethics at all*.
Steve *only* cares about making *money*, and he acts as if the groups are his private hunting ground.

-- He abuses this group and others for job-hunting and advertising over and over again
-- He is insulting lots of people here when they ask him to stop this
-- He posted as Steve, Ron, Tom, Rachel, Kathy, Kristine, Heather and ??? while asking questions
(the latest 'star's': 'Access Resource' and Tom (e-mail address removed) and Andy)
-- He tries to sell a CD ($125,--) with FREE code he gathered from these groups here
-- There even has been a 'Scam-alert' about him which has been explained recently in the thread 'To all':
http://groups.google.com/group/comp.databases.ms-access/msg/46038ba2954261f9?hl=en
-- Also recently it became clear that he has been spamming innocent people asking questions:
http://groups.google.com/group/comp.databases.ms-access/msg/4f76d0ed3e5f58ad?hl=en

So why would ANYBODY ever trust a person like him and hire him?
********************************************************

Explanation and more links on this answer:
http://home.tiscali.nl/arracom/stopsteve.html

Arno R
 
Paul

Let's say you have a Persons table and a HolidayGreetings table. One Person
can have sent out many Holiday Greetings.

If you were able to delete a person from the Persons table, what would you
want to have happen to the information in the HolidayGreetings table?

If you want to have all those (related) HolidayGreetings records deleted
too, PCD/Steve's approach would work.

If you don't want to have those deleted, DON'T delete the person in the
first place.

Step back for a second ... can you describe what you are trying to
accomplish, rather than "how"?

Regards

Jeff Boyce
<Office/Access MVP>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top