Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete button made by wizard does not work

Status
Not open for further replies.

buee04

Technical User
Jun 27, 2002
129
US
Hi,

Why doesn't the delete record button created by the wizard work? Is there something else that I gotta do or am I using the delete button incorrectly?

Also, when I want to delete a record manually from the table, how can I delete it completely? Cuz I can delete it from the main table, but that record in the other related tables isn't deleted. For example, I have an order stored in the main record and its products that were ordered are stored in another table. When I delete the order from the main, that order's products are still there.

Will the delete record button by the wizard do that, when it works that is?

THANKS in advance!
 
Sounds to me like you don't have your relationships set up properly? You might need to check them or re-read on how to do that properly? Life's a journey enjoy the ride...

jazzz
 
I dunno, almost all of the tables are in a one to many relationship with the main table, except a couple one to ones but for security reasons.

All I did to create the relationships was click, hold, and drag the field that I want to link from one table to the corresponding field in the other table, in the relationships window.

Would that prevent the delete button from working though?

Thanks for looking!
 
I was referring to why you are not deleting all incidences of a record. You must have relationships set up wrong. As far as the delete button not working I wasn't addressing that problem.

However, create a button not using the wizard and add the following two lines of code on the onclick event

DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

naturally always add your error handlers and see if that works? Life's a journey enjoy the ride...

jazzz
 
Can I send you my relationships diagram?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top