Update ComboBox after Adding data on second form

ranger14

New member
Joined
Aug 8, 2006
Messages
1
Programming Experience
Beginner
Greetings,
I'm using the SQL Server version of the Northwind Database to test with. I added a Data Source with only the customer table selected. In the DataSources Tab, I change the Customers view to "Details", then click on CompanyName and Change it to ComboBox. Now, I drag the ComboBox to Form1. I select ComboBox Tasks and select Use Data Bound Objects. I bind DataSource to CustomerDataSource. DisplayMember to CompanyName and ValueMember to CustomerID. Running the project now will display all the company names from the Customers table. So far so good. Now the problem. I add a second Form, accessed by a Button with Form2.Show as it's clickable action. For Form2, I click on the Customers Dataset in the DataSources tab and change it to Grid View. Now, run the project and test Combobox to see if it's still working, yep. Now click on the button to open form2. Add a new company and save. Close form2 and click on the Company combobox in form1. The newly added company does not show up. How do I force the Combox in form1 to update the listed companies after they have been added in form2?? I'm using Visual Studio 2005 Pro Edition with Visual Basic 2005
Thanks,
ML
 
Back
Top