Dim da As OleDbDataAdapter
Dim ds As New DataSet
Dim conn As New OleDbConnection
conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Programing\Project_Final\Stores_management_system\Stores_management_system\bin\Database_Access\Database_shop.accdb"
conn.Open()
Dim dt As New DataTable
dt = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})
Dim dr As DataRow
Dim access As String
listshowstock.Items.Clear()
da = New OleDbDataAdapter(Nothing, conn)
For Each dr In dt.Rows
listshowstock.Items.Add(dr.Item(2))
access = "SELECT * FROM [" & dr.Item(2).ToString() & "]"
da.SelectCommand.CommandText = access
da.Fill(ds, dr.Item(2).ToString())
Next