I have been trying to figure this out for the past day or so and need some help. I am passing data from a combobox in one form to a combobox in a second form.

The first time I click on the "cmdNewTicket", everything shows up just fine in the new form EXCEPT the data in the combobox.

The second time I click on the "cmdNewTicket" cmd button, everything works exactly as it should...even the combobox.

Here's the code:

VB Code:
  1. Private Sub cmdNewTicket_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNewTicket.Click
  2.                 Dim newTicketForm As frmCreateRemainderRawTickets
  3.                           'This call instantiates the forms collection to the form that I am creating.
  4.                           'The second time I run this, the initialization portion is not called
  5.                           'from the form manager.
  6.  
  7.                 newTicketForm = CType(FormManager.getForm(FormManager.CREATE_REMAINDER_RAW_TICKETS), frmCreateRemainderRawTickets)
  8.  
  9.                 Dim drv As DataRowView
  10.                 drv = cmbTicketNum.SelectedItem
  11.  
  12.                 'I think that this is what is happening.  
  13.                                 'When run for the first time,
  14.                 'The selected item, cmbTicketNum.selecteditem, is the first record because the
  15.                 'Recordset is re-initialized during the call to the
  16.                 'Form Manager above.
  17.  
  18.                 Dim row As Data.DataRow
  19.                 row = drv.Row
  20.  
  21.                 Dim origCourses As Decimal = CDec(lblCourses.Text)
  22.                 Dim usedCourses As Decimal = CDec(txtNumberOfCourses.Text)
  23.                 Dim defaultCourses = origCourses - usedCourses
  24.  
  25.                 'Get the width and length to transfer over to other form
  26.                 Dim nWidth As Decimal = CDec(lblWidth.Text)
  27.                 Dim nLength As Decimal = CDec(lblLength.Text)
  28.                 newTicketForm.prime2(tempRemainderTickets, row("PK_Item"), row("sDescription"), defaultCourses, nWidth, nLength, Me)
  29.         End Sub

VB Code:
  1. 'Second Form
  2.         Public Sub prime2(ByVal inTickets As ArrayList, _
  3.          ByVal inItemPk As Integer, _
  4.          ByVal itemDesc As String, _
  5.          ByVal defaultCourses As Decimal, _
  6.          ByVal width As Decimal, _
  7.             ByVal length As Decimal, _
  8.          ByVal inCallingForm As frmConsumeRawMaterial)
  9.  
  10.                 autoUpdate = True
  11.                 callingForm = inCallingForm
  12.                 tickets = inTickets
  13.                 itemPk = inItemPk
  14.  
  15.                 ' Suppress repainting the TreeView until all the objects have been created.
  16.                 TreeView1.BeginUpdate()
  17.  
  18.                 ' Clear the TreeView each time the method is called.
  19.                 TreeView1.Nodes.Clear()
  20.  
  21.                 If tickets.Count > 0 Then
  22.                         Dim ticket As RawTicket
  23.                         For Each ticket In tickets
  24.                                 Dim node As TreeNode
  25.                                 node = New TreeNode("Ticket #" & ticket.getTicketNum())
  26.                                 TreeView1.Nodes.Add(node)
  27.                         Next
  28.                 End If
  29.  
  30.                 'lblItemDesc.Text = itemDesc
  31.                 clearFields()
  32.                 cboItem.SelectedValue = itemPk
  33.                 txtNumberofCourses.Text = defaultCourses
  34.  
  35.                 txtAverageWidth.Text = width
  36.                 txtAverageLength.Text = length
  37.  
  38.                 ' Look up item PK, width, length, and thickness if haven't already.
  39.                 'If poItem.getItemPK < 0 Then
  40.                 '       setItemInfo()
  41.                 'End If
  42.  
  43.                 ' Begin repainting the TreeView.
  44.                 TreeView1.EndUpdate()
  45.                 autoUpdate = False
  46.                 dataValidator = New DataValidator
  47.  
  48.                 'callingForm.Hide()
  49.                 Me.Show()
  50.         End Sub
  51.  
  52.         Public Overrides Sub init()
  53.                 'This is where the passed data to the combobox it cleared when the
  54.                 'Consume Raw Material form attempts to pass the selected item to the
  55.                 'Create Remainder Raw Material Tickets form.  This event only happens
  56.                 'the first time which is consistant with the reason the data is there
  57.                 'the first time but not following times.
  58.  
  59.                 DataSetRemainderItem1.Clear()
  60.                 ItemsDataAdapter1.Fill(DataSetRemainderItem1)
  61.  
  62.  
  63.         End Sub