Cause of a checkbox field to disappear with a backend save call?
Posted on 2003-02-21
I have a piece of code in the QueryOpen of a document which works in the backend of the doc and calls a back end save. When this code is in place, the one checkbox field I have the form totally disappears. This same piece of code works well in another form with a checkbox field in it. The form properties are the same with the exception of the non-working form has 'Formulas inherit values from selected document'. But there is no formula in the Lock field. Here is the code:
'If doc is new document then exit sub
If (Source.IsNewDoc) Then
End If 'New Doc, Lock not reqd
Dim varLock As Variant
Dim session As New NotesSession
Dim nnUserName As New NotesName(session.UserName)
'Grab the backend document to do the work there
'Get the lock field
'If lock field is not empty - put up message
If (varLock(0) <> "") Then
Msgbox ("Document is currently locked by "+varLock(0)+". A read-only copy will be opened for your use.")
'put current user name in lock field to keep doc locked until done editing.
The last line is the culprit which makes the checkbox field disappear. Any insight is greatly appreciated!