Cause of a checkbox field to disappear with a backend save call?

Posted on 2003-02-21
Medium Priority
Last Modified: 2013-12-18
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
          Exit Sub
     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
     Set docBackend=Source.document
     '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.")
          Exit Sub
     End If
     'put current user name in lock field to keep doc locked until done editing.
     Call docBackend.Save(True,True)

The last line is the culprit which makes the checkbox field disappear.  Any insight is greatly appreciated!
Question by:Peripheal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 24

Expert Comment

ID: 7993644
Is this Lock field checkbox ? If so what is the formula for choices ? If you are pointing to a field, check if this is inherited properly.

LVL 63

Expert Comment

ID: 7993876
Put into Lock field default value this formula:

Please be aware that the name of the field has to be without quotas.

Good luck,

Accepted Solution

scottrma earned 200 total points
ID: 7994054
See this article:

If Checkbox or Radio Button Keyword is Null, Saving via QueryOpen Event Causes Field to Disappear



Author Comment

ID: 7995440

Thank you for the information.  Another one of those wonderful features of Notes!  I just added a default value in the checkbox field to make it work.  That's not what I wanted to do, but I can live with it.

I appreciate your time!

Have a great weekend!

Expert Comment

ID: 7995527
Hi Lisa,

Glad to hear you were able to use a workaround. Believe me, I have seen Notes do much weirder things than this :-)

Have a great weekend as well.



Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question