Hey guys,
I have a form that is filter based on a combo box. I would like to add another filter for date. but the code I'm using for the first combo box doesn't work for date.
the code is:
-----
Sub SetFilter()
Dim LSQL As String
LSQL = "select * from Preventive_Q_View"
LSQL = LSQL & " where Item_Name = '" & Combo206 & "'"
Form_Preventive_View.RecordSource = LSQL
End Sub
----
How do I modify this code to work with the date combo box?
also, is there a way to get both filters to work together, as in filter based on the first combo OR the second combo, OR both?
Thanks a lot.
I have a form that is filter based on a combo box. I would like to add another filter for date. but the code I'm using for the first combo box doesn't work for date.
the code is:
-----
Sub SetFilter()
Dim LSQL As String
LSQL = "select * from Preventive_Q_View"
LSQL = LSQL & " where Item_Name = '" & Combo206 & "'"
Form_Preventive_View.RecordSource = LSQL
End Sub
----
How do I modify this code to work with the date combo box?
also, is there a way to get both filters to work together, as in filter based on the first combo OR the second combo, OR both?
Thanks a lot.