title: Access VBA - Trigger combobox change event
body: <p>I have been playing around with form designs and now I have constructed a form, which is almost complete, just one problem left. Let me explain first:</p>
  
  <p>Form is bound to a "Join Table", which has only 2 fields - ID from "Table1" and ID from "Table2". Based on those two fields I have added fields from "Table1" &amp; "Table2", on same form. Then I have added 2 option buttons, 1 Combobox and 2  Subforms.</p>
  
  <p>This allows me to watch records from two different tables that are joined, from each point of view - "Table1" or "Table2" view. I am selecting this views with Option buttons, which changes Combobox rowsource, so you can navigate to records from Combobox.</p>
  
  <p>Here is code :</p>
  
  <pre><code>Private Sub OptButton0_Click()
          If Me.OptButtonO.Value = True Then
  
          Me.OptButton1.Value = False
  
         Me.Cmbox.RowSource = "SELECT [Table1].[Field1], [Table1].[Field2], [Table1].[Field3] FROM Table1 ORDER BY [Field1];"
  
        Me.Cmbox.SetFocus
        Me.Cmbox = Me.Cmbox.ItemData(0)
  
          End If
  
   End Sub
  
   Private Sub Cmbox_AfterUpdate()   
     If Me.OptButton0.Value = True Then
  
      If IsNull(Me!Cmbox) Then Exit Sub
  
      With Me.RecordsetClone
        .FindFirst "[Field1] = " &amp; Me!Cmbox
        If Not .NoMatch Then
           If Me.Dirty Then Me.Dirty = False
           Me.MySubform.Width = 8280
           Me.MySubform.SourceObject = "MySubform"
           Me.Bookmark = .Bookmark
        Else
           Me.MySubform.Width = 8000
           Me.MySubform.SourceObject = ""
        End If
  
      End With
  
  Me.Cmbox.SetFocus
  DoCmd.Requery
  
  End If
  
  End Sub
  </code></pre>
  
  <p>This posted code is only for one Option button, second one is same, just opposite. Now what is problem ?</p>
  
  <p>Problem is that when I navigate through record via Combobox, click second Option button for another view AND THEN RETURN to same view, my subform results stays same as they were when I clicked another Option button, although Combobox listIndex is 0. If I select combobox Listindex from Combobox, code works again.</p>
  
  <p>SO BASICALLY - I NEED CODE THAT WILL TRIGGER COMBOBOX CHANGE WHEN OPTION BUTTONS ARE CLICKED. It works when you're clicking in Combobox, but not when clicking in Option button.</p>
  
  <p>I know It's complicated to understand, please take a look at code, and ask anything. Any help appreciated.</p>