Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

I can't close the form until i change a combobox selected index

$
0
0
I have a form which has a combobox loading some data from database in the form load and i try to close the form it does not end
this is the code that fill the combobox

Code:

Using conn As New System.Data.OleDb.OleDbConnection(ConnectionString)
            conn.Open()
            Dim sqlCmd As New System.Data.OleDb.OleDbCommand("select * from familles ", conn)
            Dim dr As System.Data.OleDb.OleDbDataReader = sqlCmd.ExecuteReader()
            dtProducts.Load(dr)
            conn.Close()
        End Using
        combobox.DataBindings.Add(New System.Windows.Forms.Binding("Text", dtProducts, "ID", True, DataSourceUpdateMode.OnPropertyChanged))
        combobox.DisplayMember = "famillenom"
      combobox.DataSource = dtProducts

I'm using vs 2005 and thank you

Viewing all articles
Browse latest Browse all 42215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>