Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.
Sub FillDGV_Supplier() Try Dim sSQL As String If Me.ComboBox_SupplierStatus.SelectedIndex = 0 Then sSQL = "Select * From [Q3 Supplier Totals]" ElseIf Me.ComboBox_SupplierStatus.SelectedIndex = 1 Then sSQL = "Select * From [Q3 Supplier Totals Unpaid]" ElseIf Me.ComboBox_SupplierStatus.SelectedIndex = 2 Then sSQL = "Select * From [Q3 Supplier Totals Paid]" End If Dim connection As New OleDbConnection(ConnectionString) Dim dataadapter As New OleDbDataAdapter(sSQL, connection) Dim ds As New DataSet() connection.Open() dataadapter.Fill(ds, "Suppliers_table") connection.Close() DataGridView_Supplier.DataSource = ds DataGridView_Supplier.DataMember = "Suppliers_table" Total_Supplier_Boxes() 'Me.DataGridView_Supplier.Columns(1).Width = 25 Catch ex As Exception MsgBox(ex.Message) End Try End Sub
|VB.net SQL Views don't incorporate new columns added to a table||6||27|
|Need ideas on how to better approach the comparison of two different databases tables and show all the differences in a report.||18||60|
|Select all rows in datagridview||15||9|
|Select datagridview rows by range or numbers||11||0|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
15 Experts available now in Live!