Imports System.Data.OleDb
Public Class Form9

    Private dbc As New OleDbConnection(conStr)


    Dim less As Integer = 10

    Public Sub lessStocks()
        Dim dba As New OleDbDataAdapter("SELECT tbStocks.StockID,tbProduct.ProdName,tbStocks.Price,tbStocks.Quantity FROM tbStocks INNER JOIN tbProduct ON tbStocks.ProdID=tbProduct.ProdID WHERE tbStocks.Quantity <= " & 10 & ";", dbc)
        Dim dbset As New DataSet
        dba.Fill(dbset)
        Me.DataGridView1.DataSource = dbset.Tables(0).DefaultView

    End Sub

    Private Sub Form9_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        lessStocks()

    End Sub
End Class