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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete response document on delete of main document

Status
Not open for further replies.

pechettysuguna

Programmer
Oct 11, 2001
39
JP
hi,

How to delete the response document when we delete one of the document from of main Form document.

Eg. Form 1- employee (document type)
Form 2 - Training(response type)
deleting one of the document in employee form should also delete all related document in Training form also.
thanks.
suguna
 
You need to create a view that lists response docs by the content of the $Response field (and do not display in a hierarchy of course).

With that, you can then implement in the QueryDelete section of the Database Resources some code that will check the view and find any responses with the UNID of the main document. If there are any, you can either attempt to delete them, or block the current deletion and popup a message to the user telling them to delete the responses first.

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top