In the app that I am creating using Visual Studios 2008, vb.net, I have a Main form and a sub form that opens to do a search. On that search form it has a combobox that pulls data from a dataset and populates the corresponding textboxes with data. What I am trying to do is pass that data on the search form to the Main form (to the appropriate textboxes) on a button click. Below is the code I am using:
Private Sub btnAddBillcompany_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddBillcompany.Click
MainForm.txtCoNameBill.Text = Me.ComboBox1.SelectedItem.ToString
When I run this I select the company name, and click the button, the window hides but the textbox on the main form is not populated with the selected text... Any help would be appreciated!!!