I have a form that allows the users to submit a request. Once the user submits a request, I would like to change the request to be on a view only status, that way they can not change it. Is there an easy way to do this?
Put the following code into the QueryModeChange event on your form:
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
If not source.editMode Then
If Source.Document.Status(0) = "Closed" Then
Messagebox "You may not edit a closed document."
continue = False
End If
End If
End Sub
Write some code into your save button or into the status field that updates the status field to closed when the document is saved.
When a user opens the document and tries to edit it the QueryModeChange event will fire, check the status field and not allow the mode change to continue if the status of the document is closed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.