title: Multi value Combobox Audit trail in Microsoft Access
body: <p>I am trying to get Multivalue combo Box Audit trail in Microsoft Access. However, I am not getting the same.</p>
  <p>I tried this code. It works for text box, but not for Multivalue combo Box.</p>
  <pre><code>Option Compare Database
  Option Explicit
  Sub AuditChanges(IDField As String, UserAction As String)
  On Error GoTo AuditChanges_Err
  Dim cnn As ADODB.Connection
  Dim rst As ADODB.Recordset
  Dim ctl As Control
  Dim datTimeCheck As Date
  Dim strUserID As String
  
  Set cnn = CurrentProject.Connection
  Set rst = New ADODB.Recordset
  
  rst.Open &quot;SELECT * FROM tblAuditTrail&quot;, cnn, adOpenDynamic, adLockOptimistic
  datTimeCheck = Now()
  strUserID = Environ(&quot;USERNAME&quot;)
  Select Case UserAction
  
  Case &quot;EDIT&quot;
      For Each ctl In Screen.ActiveForm.Controls
     
          If ctl.Tag = &quot;Audit&quot; Then
          If Nz(ctl.Value) &lt;&gt; Nz(ctl.OldValue) Then
          
          With rst
          
          .AddNew
          ![FormName] = Screen.ActiveForm.Name
          ![RecordID] = Screen.ActiveForm.Controls(IDField).Value
          ![FieldName] = ctl.ControlSource
          ![OldValue] = ctl.OldValue
          ![NewValue] = ctl.Value
          ![UserID] = strUserID
          ![DateTime] = datTimeCheck
          ![Action] = UserAction
          ![FormRecordID] = Screen.ActiveForm.CurrentRecord
      
      .Update
      End With
      End If
      End If
      Next ctl
      Case Else
      
      With rst
      .AddNew
          ![DateTime] = datTimeCheck
          ![UserID] = strUserID
          ![FormName] = Screen.ActiveForm.Name
          ![Action] = UserAction
          ![RecordID] = Screen.ActiveForm.Controls(IDField).Value
      .Update
      End With
      End Select
      
  AuditChanges_Exit:
      On Error Resume Next
      rst.Close
      cnn.Close
      Set rst = Nothing
      Set cnn = Nothing
      Exit Sub
      
  AuditChanges_Err:
      MsgBox Err.Description, vbCritical, &quot;ERROR!&quot;
      Resume AuditChanges_Exit
          
  End Sub
  </code></pre>
  <p>Please provide correct updated code to get audit trail for MV combobox.</p>
  <p>I tried with different codes but couldn't help.</p>
  <p>Regards,
  Nilay.</p>