asked on
Sub FillDGV_Supplier(ByVal Status As String)
Try
Dim sSQL As String
If Status = "Unpaid" Then
sSQL = "Select * From [Supplier Totals Unpaid]"
ElseIf Status = "Paid" Then
sSQL = "Select * From [Supplier Totals Paid]"
Else
sSQL = "Select * From [Supplier Totals All]"
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