[RESOLVED] Multiple filter with Combobox or checkbox
I want to do the following,
I have a database with a field that has the AREA letter. Exsaple P from Process. Each area can have many items.
When I open the form it lists me all the items from all areas in a listview. Now what I want to do is to change add a filter to my SQL statement acording to my combobox or checkbox.
Lets start easy, I have only one combobox and want to filter the selected area. Dont forget if I have not selected something, it has to show all items.
Thanks
Re: Multiple filter with Combobox or checkbox
I found the way to do it.
Code:
If Combo1 <> "All" Then
rst.Open "SELECT SUM(total)AS [SubTotales] FROM db where nroproj ='" & Combo1 & "'", base
Else
rst.Open "SELECT SUM(total)AS [SubTotales] FROM db ,base
End If