"Locking Down" db

Author: Tripp W Black

Created: 08/26/1999 at 07:51 PM

 

Category:
Notes Developer Tips
Forms/Subforms, Formulas, LotusScript

"Locking Down" = after condition, doc can no-longer be edited.

Have a field named Reader set as Reader data type and a field named Author defined as
Author data type. When the document is marked "Closed", have the Author field set to
"None" and Reader set to "". This will allow your users to read the document, but not edit
it. Something like that should work. You might also want to try setting the form to another
form that does not have edit writes (Form properties, Key tab).

******************************************
You can stop the editing by doing the following as an example:

Using LotusScript in the Querymodechange event.

I.e.

If Not source.EditMode And source.document.yourfieldhere = "Closed" then
messagebox "Edit not allowed"
continue = false
endif

This should stop them, and obviously the messagebox could be replaced if desired.

*************************************************************

I added the following code to form Querymodechange sub.

Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
If Not (source.EditMode) Then
currentstatus = source.Fieldgettext("Status")
If (currentstatus = "Complete") Then
Messagebox ("Document available for read only - no updates.")
continue = False
End If
End If
End Sub


previous page