Hi
I have a database that holds recipes and I would like to be able to filter, in or out, certain ingredients.
For example show all recipes containing chicken or filter out all recipes containing nuts. I would also like to be able to filter with multiple criteria such as show all beef dishes that do not contain tomato, etc.
Each recipe has checkboxes to record which categories it should be included in and I have been trying to use unbound checkboxes in the header of a continuous form to mach these categories for filtering.
I can happily include or exclude one category like this.
But I can't work out how to make the filter more complex to allow for the 10 criteria I would like to filter in or out. I have a nasty feeling that it may be too much for my limited programming ability but was hoping that someone may be able to help me by explaining it as simply as possible?
I hope I have explained things appropriately and am very appreciative of any help that can be offered.
Thanks
I have a database that holds recipes and I would like to be able to filter, in or out, certain ingredients.
For example show all recipes containing chicken or filter out all recipes containing nuts. I would also like to be able to filter with multiple criteria such as show all beef dishes that do not contain tomato, etc.
Each recipe has checkboxes to record which categories it should be included in and I have been trying to use unbound checkboxes in the header of a continuous form to mach these categories for filtering.
I can happily include or exclude one category like this.
Code:
Private Sub chk_ExChicken_Click()
If Me.chk_ExChicken = -1 Then
Me.Filter = "([Rec_Chicken] = False)"
ElseIf Me.chk_ExChicken = 0 Then
Me.Filter = ""
End If
Me.FilterOn = True
End Sub
I hope I have explained things appropriately and am very appreciative of any help that can be offered.
Thanks
Comment