BDCarrillo
Technical User
TM and TY are temporary strings pulling a formatted Month and Year from hidden columns on a combo box.
Filtering the year OR month only works just fine, but the string below with "AND" throws a runtime error 13 type mismatch.
I just need help formatting this filter to work right with both Month and Year
Filtering the year OR month only works just fine, but the string below with "AND" throws a runtime error 13 type mismatch.
Code:
strWhere = "Month([Expense_Date])=" & TM
'^ Works fine
strWhere = "Year([Expense_Date])=" & TY
'^ Works fine
strWhere = "Month([Expense_Date])=" & TM And "Year([Expense_Date])=" & TY
'^ Throws runtime error 13 type mismatch
I just need help formatting this filter to work right with both Month and Year