We're on the right track now...I get:

An unhandled exception of type 'System.NullReferenceException' occurred in MyApplication.exe

Additional information: Object reference not set to an instance of an object.

And it hi-lites the first line in yellow. If I comment out the first line, it hi-lites the second line, and so on.

'pm' is the main form of my solution (not the one in focus now), the form I'm working on has a datagrid with a select and a cancel button beneath it. The idea is to select a row in the datagrid, and move the data in that row to the textboxes on the main form. I suspect I'm handling the move to the main form wrong, but I'm not sure.

VB Code:
  1. Private Sub btnCustSearchSelect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCustSearchSelect.Click
  2.  
  3.         Dim pm As PartsManager
  4.  
  5.                'Crashes on this line first
  6.             pm.txtCustomerName.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 0)
  7.             pm.txtCustomerNumber.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 1)
  8.             pm.txtCustomerAddress.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 2)
  9.             pm.txtCustomerAddress2.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 3)
  10.             pm.txtCustomerPOBox.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 4)
  11.             pm.txtCustomerCity.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 5)
  12.             pm.txtCustomerState.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 6)
  13.             pm.txtCustomerZip.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 7)
  14.             pm.txtCustomerContact.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 8)
  15.             pm.txtCustomerPhone.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 9)
  16.             pm.txtCustomerNotes.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 10)
  17.             pm.txtCustomerLastUpdate.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 11)
  18.             pm.txtCustomerUpdatedBy.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 12)
  19.             pm.chkCustShipTo.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 13)
  20.             pm.chkCustKeepInventory.Text = grdCustSearchResults.Item(grdCustSearchResults.CurrentRowIndex, 14)
  21.  
  22.         Me.Close()
  23.     End Sub