Good Evening!!!

I'm Álvaro, a 23yo Spaniard who is trying to write a small program to control the stock of tools and spare parts for a heritage railway association.

I have created an Acces database with the 2007 version, and I'm using VB2008 to do a small application to control the inventory. I've managed to do almost everything I want for the moment except one thing.

I want to do a search tool of the database with two criterias:

1-Name of the spare piece ("Article")
2-Number of units of the Spare piece ("Quantity")

I have created a RowFilter to do the search, the code is as follows:

Dim view As New DataView
view.Table = PruebasDataSet.Almacén
view.RowFilter = "Article LIKE'" & TextBox1.Text & "%'"
AlmacénDataGridView.DataSource = view
AlmacénDataGridView.Update()

This means that the search uses the name of the spare part in the "Article" column and compares it to the Text in the TextBox

What I would like to do is, using a Checkbox, adding another criteria to the RowFilter.

When the checkbox is checked it would include in the search the following criteria: Quantity >0, meaning there are units available of the Article.

When the Checkbox is unchecked, it would include available and non available articles.

Thank you very much in advance.

Saludos

Álvaro