title: Using multiple values field in Lotus Notes
body: <p>I am trying to write a logging system for a form in Lotus Notes but I am at the part where I am not sure how I can append the information about the fields that are changed in the log fields. There are 3 fields that I use Log_Date (date), Log_User and Log_Actions (Text, allow multiple values).</p>
  
  <p>I thought if I add comma to the log field it will create a new line when displaying the form but I am still getting a type mismatch on the case 2 line. </p>
  
  <p>How can I append the new values to the log fields?</p>
  
  <pre><code>Sub Querysave(Source As Notesuidocument, Continue As Variant)
      ' Compare the values in the form after it is saved with its original values when the document is not a new document.    
      Dim doc As NotesDocument
      Set doc = Source.Document
  
      Dim session As New NotesSession
      Dim user As String
      user = session.CommonUserName
  
      If newDoc Then
          doc.Log_Date = Now()    
          doc.Log_User = user
          doc.Log_Actions = "New document created."
      Else        
          ' Load fields value to the array
          lastValues(0) = doc.QCR_No(0)
          lastValues(1) = doc.QCR_Mobile_Item_No(0)
          lastValues(2) = doc.QCR_Qty(0)
  
      ' Compared each value in the array to see if there is any difference
          Dim i As Integer
          For i = 0 To 2
              If lastValues(i) &lt;&gt; originalValues(i) Then
                  Select  Case i
                  Case 2 : doc.Log_Actions = doc.Log_Actions &amp; "," &amp; "Field QCR_Qty is changed"
                  End Select
              End If
          Next
      End If
  End Sub
  </code></pre>