Filter a form based on a date selected from a combo box

bakkouz

Registered User.
Local time
Today, 03:02
Joined
Jan 16, 2011
Messages
48
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.
 

Users who are viewing this thread

Back
Top Bottom