Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Stop Deletion of one sort of form

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#StopFormDelete or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/StopFormDelete


Here is some code to stop the deletion of one sort of  form in a database. I used this to prompt the user to press a button to delete the form. This then checks that the form is the correct status and also deletes any associated child documents.





 

This code will prevent a user from deleting any Form called "Questions".

Stick this in the QueryDocumentDelete event

 

Dim col As notesdocumentcollection
Set col = source.documents

Dim doc As notesdocument
Set doc = col.getfirstdocument
Do Until doc Is Nothing
 If doc.Form(0)="Questions" Then
  continue = False
  Messagebox "Please use the button!"
 End If
 Set doc = col.getnextdocument(doc)
Loop

 

 

 

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
man and boy by Tony Parsons
British book of the year 2000. Great book, hard to put down, but I nearly threw it away half way through. You'll know why when you read it.
See at: Amazon.co.uk | Amazon.com |