Hello All,
I have this code on my form in QueryModeEvent.
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Dim entry As NotesACLEntry
Set db=session.CurrentDatabase
Set acl=db.ACL
Set entry=acl.GetEntry(session.UserName)
If Not ( Source.EditMode ) Then
status = Source.FieldGetText( "EndStatus" )
If (status="Running") And (entry.IsRoleEnabled("TapeLib"))=False Then
Messagebox _
("This back-up is available for browsing only - If you have a query on this back-up please contact HelpDesk. Thank you." )
continue= False
End If
If (status="Completed") And (entry.IsRoleEnabled("TapeLib"))=False Then
Messagebox _
("This back-up is available for browsing only - If you have a query on this back-up please contact HelpDesk. Thank you." )
continue= False
End If
End If
End Sub
If the document status is “Running” or “Completed” and I try to edit it, it doesn’t let me, and it displays the message - great! However, it a user does the same it comes up with “Object Variable not set” and lets them edit and save…
Does anyone know why?
No one, apart from Admin has the “[TapeLib]” role, which is correct.
Any help is really appreciated, as usual.
Thanks,
Hayley.