Q:

How to display selected value in datagrid?. vb 6

I'm trying to get the value of medicine that has a quantity of less than 15 and display it in datagrid.For example I have paracetamol that has quantity of 15 or less then the paracetamol will automatically display in the datagrid. I have a table name inventory with the field names MedicineName, Genericname, StockQuantity etc. My problem here is all the records in database display. 
Please help me. Thank you..
Here is my code in adodc connection
Select StockQuantity from inventory

Private Sub Form_Load()
  Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clinic.mdb" & ";Persist Security Info=False"
Adodc2.RecordSource = "select * from inventory order by StockQuantity asc"
Set DataGrid2.DataSource = Adodc2
Adodc2.Refresh

IF  StockQuantity <= 15 then Adodc2.Recordset(“StockQuantity”)
End If
End sub

A:

If you need to filter your result, you can simply retrieve a filtered list, instead of fetching all data and add filter on datatable level.
You can simply modify your query;
Adodc2.RecordSource = "select * from inventory where StockQuantity < 15 order by StockQuantity asc"

